diff options
author | ZoRo <dos21h@gmail.com> | 2022-02-19 21:43:52 +0000 |
---|---|---|
committer | ZoRo <dos21h@gmail.com> | 2022-02-19 21:43:52 +0000 |
commit | c6d603981adec7c0099fb48fc3369517b458ee85 (patch) | |
tree | 5096f42f05d884ded2336b11f806f49e49eb3732 /Makefile | |
parent | 3d7c48a6e5c5c532cdd66b3ba5a8c5911bcf2383 (diff) | |
download | librusb-c6d603981adec7c0099fb48fc3369517b458ee85.tar.gz librusb-c6d603981adec7c0099fb48fc3369517b458ee85.zip |
Compilable rusb for linux
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 |