]> rtime.felk.cvut.cz Git - rpp-test-sw.git/blobdiff - rpp-test-sw/Makefile.inc
Fix clean target
[rpp-test-sw.git] / rpp-test-sw / Makefile.inc
index 796d36cef8b8f5b06ea3cd983166341fc3b9c6de..79be214177d9ce150db9a7cce566536d3569f53d 100644 (file)
@@ -1,16 +1,17 @@
 makefile_inc_dir := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
 
-all: rpp-test-sw
+all: rpp-test-sw.out
 
 # Use the configuration "exported" by library build
 CONFIG = $(makefile_inc_dir)/../rpp-lib/Makefile.config
 ifneq ($(wildcard $(CONFIG)),)
 include $(CONFIG)
 else
-$(error "rpp-lib not compiled! Run `make -C $(makefile_inc_dir)/../rpp-lib/build/<target>/Release`")
+$(error "rpp-lib not compiled! Either run `make -C $(makefile_inc_dir)/../rpp-lib/build/<target>/Release` or build the appropriate CCS project.")
 endif
 
 include $(makefile_inc_dir)/../rpp-lib/build/Makefile.rules
+include $(makefile_inc_dir)/../rpp-lib/common.mk
 
 SOURCES = \
        cmdproc/src/cmdproc.c \
@@ -34,7 +35,7 @@ OBJS = $(SOURCES:%.c=%.obj)
 RPP_CFLAGS += -I$(makefile_inc_dir)/cmdproc/include -I$(makefile_inc_dir)
 RPP_CFLAGS += -I. # For version.h
 
-rpp-test-sw: $(OBJS) $(RPP_LIB_DIR)/rpp-lib.lib
+rpp-test-sw.out: $(OBJS) $(RPP_LIB_DIR)/rpp-lib.lib
        $(LD) $(RPP_CFLAGS) $(RPP_LDFLAGS) $(OBJS) $(RPP_LDLIBS) -o $@
 
 $(makefile_inc_dir)/commands/main.c: version.h
@@ -46,6 +47,6 @@ $(OBJS): %.obj: $(makefile_inc_dir)/%.c
        $(RPP_COMPILE_CMD)
 
 clean::
-       $(call rm,rpp-test-sw)
+       $(call rm,rpp-test-sw.out $(OBJS))
 
 -include $(OBJS:%=%.dep)