blob: 4a8438a601c202938503a7a665181ac77c4917f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
PROJECTNAME=ymake
SRC=main.cpp ymake.cpp Builder.cpp ProcessRunner.cpp file.cpp
OBJ=$(SRC:.cpp=.o)
YSCAN=yscan
YSCAN_SRC=yscan-main.cpp yscan.cpp file.cpp
YSCAN_OBJ=$(YSCAN_SRC:.cpp=.o)
all: $(PROJECTNAME) $(YSCAN)
LDLIBS += -lfmt -lreichwein
CXXFLAGS += -std=c++17
$(PROJECTNAME): $(OBJ)
$(CXX) $(LDFLAGS) $^ $(LDLIBS) $(LIBS) -o $@
$(YSCAN): $(YSCAN_OBJ)
$(CXX) $(LDFLAGS) $^ $(LDLIBS) $(LIBS) -o $@
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
install:
mkdir -p $(DESTDIR)/usr/bin
cp $(PROJECTNAME) $(DESTDIR)/usr/bin/
cp $(YSCAN) $(DESTDIR)/usr/bin/
clean:
-rm -f *.o $(PROJECTNAME) $(YSCAN)
-dh_clean
deb:
dpkg-buildpackage -rfakeroot
.PHONY: clean install all deb
|