From 501862bceaea3010d5c426d54cdb12b6c4ca2433 Mon Sep 17 00:00:00 2001 From: dianshi Date: Mon, 11 Jul 2022 20:45:23 +0100 Subject: Add make file for libusb. add latest changes to main.swift --- hardware/src/libusb/make.mk | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 hardware/src/libusb/make.mk (limited to 'hardware/src/libusb') diff --git a/hardware/src/libusb/make.mk b/hardware/src/libusb/make.mk new file mode 100644 index 0000000..acf8f12 --- /dev/null +++ b/hardware/src/libusb/make.mk @@ -0,0 +1,22 @@ +DIR=src + +SRC_UTILS_PRE += $(wildcard $(DIR)/os/*.c) +SRC_UTILS += $(wildcard $(DIR)/*.c) +OBJ_UTILS += $(SRC_UTILS:.c=.o) +OBJ_UTILS_PRE += $(SRC_UTILS_PRE:.c=.o) +LDFLAGS_UTILS = +INCLUDE = -I./include -I./src +CFLAGS = -fPIC + +build-src: src-pre + echo $(SRC_UTILS_PRE) + echo $(SRC_UTILS) + +$(DIR)-pre: $(OBJ_UTILS_PRE) $(OBJ_UTILS) + +$(DIR)/os/%.o: $(DIR)/os/%.c + $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $(BUILD_DIR)$@ + +$(DIR)/%.o: $(DIR)/%.c + echo "B" + $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $(BUILD_DIR)$@ $(LDFLAGS_UTILS) \ No newline at end of file -- cgit v1.2.3