diff options
author | FreeArtMan <=> | 2015-09-19 14:36:47 +0100 |
---|---|---|
committer | FreeArtMan <=> | 2015-09-19 14:36:47 +0100 |
commit | f8b84cf48099fb020b1174c8cc6195dde42308c3 (patch) | |
tree | 56a2ecbb7456c047d404c2b88c57e3d3be057ec7 /src/make.mk | |
download | r820t-f8b84cf48099fb020b1174c8cc6195dde42308c3.tar.gz r820t-f8b84cf48099fb020b1174c8cc6195dde42308c3.zip |
Initial
Diffstat (limited to 'src/make.mk')
-rw-r--r-- | src/make.mk | 13 |
1 files changed, 13 insertions, 0 deletions
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)$@ |