diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9f1c442 --- /dev/null +++ b/Makefile @@ -0,0 +1,39 @@ +PROJECT=rusb +CC=gcc +CFLAGS= +INCLUDE=-I./include +LDFLAGS= +LDFLAGS_LIB= + +CC=gcc +AR=ar +SOURCES= +SRC_LIB= +OBJ_LIB= +SRC_OS= +OBJ_OS= + +BUILD_DIR=build/ + +include src/make.mk + +SOURCES+=$(wildcard src/*.c) +SOURCES+=$(wildcard src/os/*.c) +OBJECTS_=$(addprefix $(BUILD_DIR),$(SOURCES)) +OBJECTS=$(OBJECTS_:.c=.o) + +#%.o: %.c +# echo "Main" +# $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $(BUILD_DIR)$@ + +all: build-src + echo "end" + #echo $(SOURCES) + #echo $(OBJECTS) + $(CC) -shared -Wl,-soname,lib$(PROJECT).so -o lib$(PROJECT).so $(OBJECTS) $(LDFLAGS_LIB) + $(AR) rcv lib$(PROJECT).a $(OBJECTS) + + +clean: + rm -rfv $(BUILD_DIR)/src/*.o + rm -rfv $(BUILD_DIR)/src/os/*.o
\ No newline at end of file |