From c6d603981adec7c0099fb48fc3369517b458ee85 Mon Sep 17 00:00:00 2001 From: ZoRo Date: Sat, 19 Feb 2022 21:43:52 +0000 Subject: Compilable rusb for linux --- Makefile | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Makefile (limited to 'Makefile') 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 -- cgit v1.2.3