2015-01-14 01:07:17 +00:00
|
|
|
CC ?= clang
|
|
|
|
CFLAGS = -MD -Wall -Wextra -pedantic-errors
|
|
|
|
LDFLAGS = -lm
|
2012-12-20 00:22:22 +00:00
|
|
|
|
2015-01-14 01:07:17 +00:00
|
|
|
CSRCS = ansi.c ast.c code.c conout.c fold.c fs.c ftepp.c hash.c intrin.c ir.c lexer.c main.c opts.c parser.c stat.c utf8.c util.c
|
|
|
|
TSRCS = ansi.c conout.c fs.c hash.c opts.c stat.c test.c util.c
|
2015-01-14 01:36:25 +00:00
|
|
|
VSRCS = ansi.c exec.c fs.c hash.c stat.c util.c
|
2012-11-17 10:00:32 +00:00
|
|
|
|
2015-01-14 01:07:17 +00:00
|
|
|
COBJS = $(CSRCS:.c=.o)
|
|
|
|
TOBJS = $(TSRCS:.c=.o)
|
2015-01-14 01:36:25 +00:00
|
|
|
VOBJS = $(VSRCS:.c=.o)
|
2013-08-16 03:28:02 +00:00
|
|
|
|
2015-01-14 01:07:17 +00:00
|
|
|
CDEPS = $(CSRCS:.c=.d)
|
|
|
|
TDEPS = $(TSRCS:.c=.d)
|
2015-01-14 01:36:25 +00:00
|
|
|
VDEPS = $(VSRCS:.c=.d)
|
2012-12-28 09:30:01 +00:00
|
|
|
|
2015-01-14 01:07:17 +00:00
|
|
|
CBIN = gmqcc
|
|
|
|
TBIN = testsuite
|
2015-01-14 01:36:25 +00:00
|
|
|
VBIN = qcvm
|
2013-08-16 07:33:57 +00:00
|
|
|
|
2015-01-14 01:36:25 +00:00
|
|
|
all: $(CBIN) $(TBIN) $(VBIN)
|
2013-08-16 03:28:02 +00:00
|
|
|
|
2015-01-14 01:07:17 +00:00
|
|
|
$(CBIN): $(COBJS)
|
2015-01-14 01:27:45 +00:00
|
|
|
$(CC) $(COBJS) $(LDFLAGS) -o $@
|
2013-08-16 03:28:02 +00:00
|
|
|
|
2015-01-14 01:07:17 +00:00
|
|
|
$(TBIN): $(TOBJS)
|
2015-01-14 01:27:45 +00:00
|
|
|
$(CC) $(TOBJS) $(LDFLAGS) -o $@
|
2013-04-28 03:50:22 +00:00
|
|
|
|
2015-01-14 01:36:25 +00:00
|
|
|
$(VBIN): $(VOBJS)
|
|
|
|
$(CC) $(VOBJS) $(LDFLAGS) -o $@
|
|
|
|
|
2015-01-14 01:07:17 +00:00
|
|
|
.c.o:
|
|
|
|
$(CC) -c $(CFLAGS) $< -o $@
|
2012-11-17 10:00:55 +00:00
|
|
|
|
2015-01-14 01:36:25 +00:00
|
|
|
test: $(CBIN) $(TBIN) $(VBIN)
|
2015-01-14 01:07:17 +00:00
|
|
|
@./$(TBIN)
|
2013-10-11 13:51:08 +00:00
|
|
|
|
2012-04-09 10:42:06 +00:00
|
|
|
clean:
|
2015-01-14 01:07:17 +00:00
|
|
|
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
|