From f8b84cf48099fb020b1174c8cc6195dde42308c3 Mon Sep 17 00:00:00 2001 From: FreeArtMan <=> Date: Sat, 19 Sep 2015 14:36:47 +0100 Subject: Initial --- src/make.mk | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/make.mk (limited to 'src/make.mk') diff --git a/src/make.mk b/src/make.mk new file mode 100644 index 0000000..57e1dbf --- /dev/null +++ b/src/make.mk @@ -0,0 +1,13 @@ +DIR_SRC=src +SRC_LIB += $(wildcard $(DIR_SRC)/*.c) +OBJ_LIB += $(SRC_LIB:.c=.o) +LDFLAGS_LIB=`pkg-config --libs libusb` -lc + +$(DIR_SRC)-lib-o: $(OBJ_LIB) + +$(DIR_SRC)-lib: $(DIR_SRC)-lib-o + gcc -shared -Wl,-soname,lib$(PROJECT).so.1 -o lib$(PROJECT).so.1 $(subst $(DIR_SRC)/,$(BUILD_DIR)$(DIR_SRC)/,$(OBJ_LIB)) $(LDFLAGS_LIB) + ar rcv lib$(PROJECT).a $(subst $(DIR_SRC)/,$(BUILD_DIR)$(DIR_SRC)/,$(OBJ_LIB)) + +$(DIR_SRC)/%.o: $(DIR_SRC)/%.c + $(CC) $(CFLAGS) -fPIC $(INCLUDE) -c $< -o $(BUILD_DIR)$@ -- cgit v1.2.3