25 lines
620 B
Makefile
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)
|