forked from cparse/cparse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (20 loc) · 894 Bytes
/
Makefile
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
EXE = test-shunting-yard
CORE_SRC = shunting-yard.cpp packToken.cpp functions.cpp containers.cpp
SRC = $(EXE).cpp $(CORE_SRC) builtin-features.cpp catch.cpp
OBJ = $(SRC:.cpp=.o)
LD ?= ld
CXX ?= g++
CFLAGS = -std=c++11 -Wall -pedantic -Wmissing-field-initializers -Wuninitialized
DEBUG = -g #-DDEBUG
release: $(CORE_SRC:.cpp=.o) builtin-features.cpp;
$(CXX) -c -O3 $(CFLAGS) builtin-features.cpp
$(LD) -r -O1 $(CORE_SRC:.cpp=.o) -o core-shunting-yard.o
all: $(EXE) release
$(EXE): $(OBJ); $(CXX) $(CFLAGS) $(DEBUG) $(OBJ) -o $(EXE)
%.o: %.cpp *.h %/*; $(CXX) $(CFLAGS) $(DEBUG) -c $< -o $@ $(DEBUG)
%.o: %.cpp *.h; $(CXX) $(CFLAGS) $(DEBUG) -c $< -o $@ $(DEBUG)
again: clean all
test: $(EXE); ./$(EXE) $(args)
check: $(EXE); valgrind --leak-check=full ./$(EXE) $(args)
simul: $(EXE); cgdb --args ./$(EXE) $(args)
clean: ; rm -f $(EXE) $(OBJ) core-shunting-yard.o full-shunting-yard.o