-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.old
36 lines (28 loc) · 728 Bytes
/
Makefile.old
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
# Configuration
BIN = codepeiler
BINDIR = bin
SOURCEDIR = src
# Generic makefile
SRCS = $(wildcard $(SOURCEDIR)/*.cpp)
OBJS = $(patsubst $(SOURCEDIR)/%.cpp, $(BINDIR)/%.o, $(SRCS))
DEPS = $(OBJS:.o=.d)
CXXFLAGS := #-MM
RELEASEFLAGS := -O3 -DNDEBUG $(CXXFLAGS)
DEBUGFLAGS := -O0 -g -DDEBUG -Wall -Wextra -pedantic -ansi $(CXXFLAGS)
LIBS :=
all: release
release:
$(MAKE) CXXFLAGS="$(RELEASEFLAGS)" $(BIN)
debug:
$(MAKE) CXXFLAGS="$(DEBUGFLAGS)" $(BIN)
#depend: .depend
#.depend: $(SRCS)
# $(CXX) $(CXXFLAGS) -MM $^ -MF ./.depend;
#include .depend
$(BINDIR)/%.o: $(SOURCEDIR)/%.cpp $(INCS)
$(CXX) $(CXXFLAGS) -c -o $@ $<
$(BIN): $(OBJS)
$(CXX) -o $@ $(OBJS) $(LIBS)
.PHONY: clean
clean:
$(RM) $(BIN) $(OBJS) $(DEPS)