summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2024-05-04 14:43:48 +0200
committerRoland Reichwein <mail@reichwein.it>2024-05-04 14:43:48 +0200
commit44479895f325cbbc283553dcb10b29a0af3b480b (patch)
treef29b9da1c782554ec3cef375d7cc771a0d56756e /Makefile
parent45983abe664be648b513202c8c12578c9a85784f (diff)
Added yscan
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 11 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index c0a8132..4a8438a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,13 @@
PROJECTNAME=ymake
-SRC=main.cpp ymake.cpp Builder.cpp ProcessRunner.cpp
-
+SRC=main.cpp ymake.cpp Builder.cpp ProcessRunner.cpp file.cpp
OBJ=$(SRC:.cpp=.o)
-all: $(PROJECTNAME)
+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
@@ -12,15 +15,19 @@ 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)
+ -rm -f *.o $(PROJECTNAME) $(YSCAN)
-dh_clean
deb: