summaryrefslogtreecommitdiff
blob: d5e046b1a154f4cf519cb5b3607cf107a1cf98f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- ninka-orig/comments/Makefile
+++ ninka/comments/Makefile
@@ -11,12 +11,13 @@
 #DEBUG = -g -DDEBUG -DIODEBUG
 
 
-all:
-	g++ $(DEBUG) $(OPTIONS) $(DEFINES) -c io.cpp
-	g++ $(DEBUG) $(OPTIONS) $(DEFINES) -c dformat.cpp
-	g++ $(DEBUG) $(OPTIONS) $(DEFINES) -c func.cpp
-	g++ $(DEBUG) $(OPTIONS) $(DEFINES) -c main.cpp
-	g++ -o $(NAME) main.o io.o dformat.o func.o
+all: $(NAME)
+
+%.o: %.cpp
+	$(CXX) $(CXXFLAGS) $(DEFINES) -c $<
+
+$(NAME): main.o io.o dformat.o func.o
+	$(CXX) $(LDFLAGS) -o $@ $^
 
 install:
 	@echo -n "Installing binary:   "