X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=Makefile;h=d35726d89526aa37a5a1c7ded0973a6cc1efeb6c;hp=a66b8116ffe39a648399cda5f91beb7d89718f4c;hb=babdebee797f07a3478d7af532536b6f44b33046;hpb=064883506137a0c91863c35c655ee7f066d32daf diff --git a/Makefile b/Makefile index a66b811..d35726d 100644 --- a/Makefile +++ b/Makefile @@ -4,12 +4,12 @@ BINDIR := $(PREFIX)/bin DATADIR := $(PREFIX)/share MANDIR := $(DATADIR)/man -UNAME = $(shell uname) -CYGWIN = $(findstring CYGWIN, $(UNAME)) -MINGW = $(findstring MINGW32, $(UNAME)) +UNAME ?= $(shell uname) +CYGWIN = $(findstring CYGWIN, $(UNAME)) +MINGW = $(findstring MINGW32, $(UNAME)) CC ?= clang -CFLAGS += -Wall -Wextra -I. -pedantic-errors +CFLAGS += -Wall -Wextra -I. -pedantic-errors -fno-strict-aliasing #turn on tons of warnings if clang is present # but also turn off the STUPID ONES ifeq ($(CC), clang) @@ -19,16 +19,18 @@ ifeq ($(CC), clang) -Wno-format-nonliteral \ -Wno-disabled-macro-expansion \ -Wno-conversion \ - -Wno-missing-prototypes + -Wno-missing-prototypes \ + -Wno-float-equal \ + -Wno-cast-align endif ifeq ($(track), no) CFLAGS += -DNOTRACK endif -OBJ_D = util.o code.o ast.o ir.o con.o ftepp.o opts.o -OBJ_T = test.o util.o con.o -OBJ_C = main.o lexer.o parser.o -OBJ_X = exec-standalone.o util.o con.o +OBJ_D = util.o code.o ast.o ir.o conout.o ftepp.o opts.o file.o utf8.o +OBJ_T = test.o util.o conout.o file.o +OBJ_C = main.o lexer.o parser.o file.o +OBJ_X = exec-standalone.o util.o conout.o file.o ifneq ("$(CYGWIN)", "") #nullify the common variables that @@ -41,7 +43,7 @@ ifneq ("$(CYGWIN)", "") GMQCC = gmqcc.exe TESTSUITE = testsuite.exe else -ifneq ("$(MINGW32)", "") +ifneq ("$(MINGW)", "") #nullify the common variables that #most *nix systems have (for windows) PREFIX := @@ -84,9 +86,10 @@ clean: rm -f *.o $(GMQCC) $(QCVM) $(TESTSUITE) *.dat # deps -$(OBJ) $(OBJ_C) $(OBJ_X): gmqcc.h opts.def +$(OBJ_D) $(OBJ_C) $(OBJ_X): gmqcc.h opts.def main.o: lexer.h parser.o: ast.h lexer.h +lexer.o: lexer.h ast.o: ast.h ir.h ir.o: ir.h