gmqcc/Makefile

53 lines
1.1 KiB
Makefile
Raw Normal View History

2012-04-25 14:20:38 +00:00
CC ?= clang
CFLAGS += -Wall -I. -fomit-frame-pointer -fno-stack-protector -fno-common
#turn on tons of warnings if clang is present
ifeq ($(CC), clang)
2012-06-07 15:18:04 +00:00
CFLAGS += \
-Weverything \
-Wno-missing-prototypes \
-Wno-unused-parameter \
-Wno-sign-compare \
-Wno-implicit-fallthrough \
-Wno-sign-conversion \
-Wno-conversion \
-Wno-disabled-macro-expansion \
2012-06-07 15:18:04 +00:00
-Wno-padded \
2012-06-07 14:59:57 +00:00
-Wno-format-nonliteral
endif
ifeq ($(track), no)
CFLAGS += -DNOTRACK
endif
OBJ = \
util.o \
code.o \
ast.o \
2012-08-21 10:03:34 +00:00
ir.o \
con.o \
ftepp.o
2012-08-21 10:03:34 +00:00
OBJ_C = main.o lexer.o parser.o
2012-11-14 20:39:16 +00:00
OBJ_X = exec-standalone.o util.o con.o
2012-04-09 10:42:06 +00:00
#default is compiler only
default: gmqcc
2012-04-09 10:42:06 +00:00
%.o: %.c
2012-04-10 01:32:24 +00:00
$(CC) -c $< -o $@ $(CFLAGS)
2012-04-09 10:42:06 +00:00
exec-standalone.o: exec.c
$(CC) -c $< -o $@ $(CFLAGS) -DQCVM_EXECUTOR=1
2012-06-25 21:58:47 +00:00
qcvm: $(OBJ_X)
2012-08-23 08:24:17 +00:00
$(CC) -o $@ $^ $(CFLAGS) -lm
# compiler target
2012-04-29 21:28:01 +00:00
gmqcc: $(OBJ_C) $(OBJ)
$(CC) -o $@ $^ $(CFLAGS)
all: gmqcc qcvm
2012-04-09 10:42:06 +00:00
clean:
rm -f *.o gmqcc qcvm