From 59f04eaa0a96f06ca4b94474c8a3a6ee677541fa Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 8 Jul 2019 19:17:11 +0200 Subject: [PATCH] Generic modules moved to lib/ --- {test-modbus => lib}/modbus.c | 0 {test-modbus => lib}/modbus.h | 0 {test-modbus => lib}/util-debug.c | 0 {test-modbus => lib}/util.h | 0 test-modbus/Makefile | 5 ++++- 5 files changed, 4 insertions(+), 1 deletion(-) rename {test-modbus => lib}/modbus.c (100%) rename {test-modbus => lib}/modbus.h (100%) rename {test-modbus => lib}/util-debug.c (100%) rename {test-modbus => lib}/util.h (100%) diff --git a/test-modbus/modbus.c b/lib/modbus.c similarity index 100% rename from test-modbus/modbus.c rename to lib/modbus.c diff --git a/test-modbus/modbus.h b/lib/modbus.h similarity index 100% rename from test-modbus/modbus.h rename to lib/modbus.h diff --git a/test-modbus/util-debug.c b/lib/util-debug.c similarity index 100% rename from test-modbus/util-debug.c rename to lib/util-debug.c diff --git a/test-modbus/util.h b/lib/util.h similarity index 100% rename from test-modbus/util.h rename to lib/util.h diff --git a/test-modbus/Makefile b/test-modbus/Makefile index ecc5aec..cbe62e8 100644 --- a/test-modbus/Makefile +++ b/test-modbus/Makefile @@ -1,6 +1,8 @@ BINARY=test OBJS=test.o util-debug.o modbus.o +vpath %.c ../lib + OPENCM3_DIR=/home/mj/stm/libopencm3 DEVICE=stm32f103x8 @@ -38,6 +40,7 @@ TGT_CFLAGS += $(ARCH_FLAGS) TGT_CFLAGS += -Wall -Wextra -Wshadow -Wimplicit-function-declaration TGT_CFLAGS += -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes TGT_CFLAGS += -fno-common -ffunction-sections -fdata-sections +TGT_CFLAGS += -I. -I../lib TGT_CPPFLAGS += -MD @@ -64,7 +67,7 @@ include $(OPENCM3_DIR)/mk/genlink-rules.mk %.o: %.c @printf " CC $(*).c\n" - $(Q)$(CC) $(TGT_CFLAGS) $(CFLAGS) $(TGT_CPPFLAGS) $(CPPFLAGS) -o $*.o -c $*.c + $(Q)$(CC) $(TGT_CFLAGS) $(CFLAGS) $(TGT_CPPFLAGS) $(CPPFLAGS) -o $@ -c $< .PHONY: clean clean: -- 2.39.5