]> rtime.felk.cvut.cz Git - pes-rpp/rpp-test-sw.git/blobdiff - rpp-test-sw/Makefile.inc
Recommend Debug build of the library with rpp-test-sw
[pes-rpp/rpp-test-sw.git] / rpp-test-sw / Makefile.inc
index b5da23900a9874123b1e87d85cd400172e6807fa..c1e44dc2ac082d5eafcaa8a8b68edbccf36c3ba2 100644 (file)
@@ -1,40 +1,27 @@
 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! Either run `make -C $(makefile_inc_dir)/../rpp-lib/build/<target>/Release` or build the appropriate CCS project.")
+$(error "rpp-lib not compiled! Either run `make -C $(makefile_inc_dir)/../rpp-lib/build/<target>/Debug` or build the appropriate CCS project.")
 endif
 
 include $(makefile_inc_dir)/../rpp-lib/build/Makefile.rules
-
-SOURCES = \
-       cmdproc/src/cmdproc.c \
-       cmdproc/src/cmdproc_freertos.c \
-       cmdproc/src/cmdproc_io.c \
-       cmdproc/src/cmdproc_io_line.c \
-       cmdproc/src/cmdproc_io_std_line.c \
-       cmdproc/src/cmdproc_io_tisci.c \
-       cmdproc/src/cmdproc_run.c \
-       cmdproc/src/cmdproc_utils.c \
-       cmdproc/src/i2str.c \
-       commands/cmd.c \
-       commands/cmd_adc.c \
-       commands/cmd_can.c \
-       commands/cmd_pin.c \
-       commands/cmd_port.c \
-       commands/main.c
+include $(makefile_inc_dir)/../rpp-lib/common.mk
+include $(makefile_inc_dir)/Makefile.var
 
 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_LDFLAGS += --heap_size=2048        # Assert requires stdio and it requires heap
+
+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 +33,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)