1
0
Files
cDrive/Makefile
2023-04-13 15:21:21 +08:00

25 lines
620 B
Makefile

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)