1
0

Initial commit

This commit is contained in:
2023-04-13 15:21:21 +08:00
commit f4e7319a44
7 changed files with 148 additions and 0 deletions

25
Makefile Normal file
View File

@@ -0,0 +1,25 @@
TARGET = cDrive
SRCS := src src/drive
VPATH := $(foreach dir,$(SRCS),$(CURDIR)/$(dir))
CFILES := $(foreach dir,$(SRCS),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES := $(foreach dir,$(SRCS),$(notdir $(wildcard $(dir)/*.cpp)))
OFILES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o)
INCLUDES := -I$(CURDIR)/include
CFLAGS := -g -Wall $(INCLUDES) `curl-config --cflags`
CXXFLAGS := $(CFLAGS) -fno-rtti -std=c++17
LDFLAGS := `curl-config --libs` -lqrcodegen -lmbedcrypto
.PHONY: all
all: $(TARGET)
$(TARGET): $(OFILES)
$(CXX) -o $@ $^ $(LDFLAGS)
run: all
@./$(TARGET)
clean:
$(RM) -fr $(BUILD) $(TARGET)