gmqcc/Makefile

75 lines
971 B
Makefile
Raw Normal View History

2015-01-15 02:48:47 +00:00
CXX ?= clang++
CXXFLAGS = \
-std=c++11 \
-Wall \
-Wextra \
-fno-exceptions \
-fno-rtti \
2015-01-15 04:34:43 +00:00
-MD \
-g3
2012-12-20 00:22:22 +00:00
2015-01-15 02:48:47 +00:00
CSRCS = \
ast.cpp \
code.cpp \
conout.cpp \
fold.cpp \
ftepp.cpp \
intrin.cpp \
ir.cpp \
lexer.cpp \
main.cpp \
opts.cpp \
parser.cpp \
stat.cpp \
utf8.cpp \
util.cpp
2012-11-17 10:00:32 +00:00
2015-01-15 02:48:47 +00:00
TSRCS = \
conout.cpp \
opts.cpp \
stat.cpp \
test.cpp \
util.cpp
2015-01-15 02:48:47 +00:00
VSRCS = \
exec.cpp \
stat.cpp \
util.cpp
COBJS = $(CSRCS:.cpp=.o)
TOBJS = $(TSRCS:.cpp=.o)
VOBJS = $(VSRCS:.cpp=.o)
CDEPS = $(CSRCS:.cpp=.d)
TDEPS = $(TSRCS:.cpp=.d)
VDEPS = $(VSRCS:.cpp=.d)
CBIN = gmqcc
TBIN = testsuite
2015-01-14 01:36:25 +00:00
VBIN = qcvm
2015-01-14 01:36:25 +00:00
all: $(CBIN) $(TBIN) $(VBIN)
$(CBIN): $(COBJS)
2015-01-15 02:48:47 +00:00
$(CXX) $(COBJS) -o $@
$(TBIN): $(TOBJS)
2015-01-15 02:48:47 +00:00
$(CXX) $(TOBJS) -o $@
2015-01-14 01:36:25 +00:00
$(VBIN): $(VOBJS)
2015-01-15 02:48:47 +00:00
$(CXX) $(VOBJS) -o $@
2015-01-14 01:36:25 +00:00
2015-01-15 02:48:47 +00:00
.cpp.o:
$(CXX) -c $(CXXFLAGS) $< -o $@
2012-11-17 10:00:55 +00:00
2015-01-14 01:36:25 +00:00
test: $(CBIN) $(TBIN) $(VBIN)
@./$(TBIN)
2012-04-09 10:42:06 +00:00
clean:
rm -f *.d
rm -f $(COBJS) $(CDEPS) $(CBIN)
rm -f $(TOBJS) $(TDEPS) $(TBIN)
2015-01-14 01:36:25 +00:00
rm -f $(VOBJS) $(VDEPS) $(VBIN)
2015-01-14 01:29:46 +00:00
-include *.d