]> de.git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - BSDmakefile
Make it a function
[xonotic/gmqcc.git] / BSDmakefile
index c5d705af92a5df3146cf8b865ec324dfc88c4136..b34cb1e7610c11a4215f29cbce9ff119d5a19e8e 100644 (file)
@@ -11,8 +11,6 @@ GITINFO  :=
     GITINFO != git describe --always
 .endif
 
-CFLAGS   +=  -Wall -Wextra -Werror -Wstrict-aliasing
-
 .if $(CC) == clang
     CFLAGS +=   -Weverything\
                 -Wno-padded\
@@ -22,6 +20,7 @@ CFLAGS   +=  -Wall -Wextra -Werror -Wstrict-aliasing
                 -Wno-float-equal\
                 -Wno-unknown-warning-option\
                 -Wno-cast-align\
+                -Wno-assign-enum\
                 -pedantic-errors
 .else
 .    if $(CC) != g++
@@ -49,11 +48,8 @@ TESTSUITE = testsuite
 PAK       = gmqpak
 
 #standard rules
-c.o: ${.IMPSRC} 
-       $(CC) -c ${.IMPSRC} -o ${.TARGET} $(CFLAGS) $(CPPFLAGS) 
-
-exec-standalone.o: exec.c
-       $(CC) -c ${.ALLSRC} -o ${.TARGET} $(CFLAGS) $(CPPFLAGS) -DQCVM_EXECUTOR=1
+c.o: ${.IMPSRC}
+       $(CC) -c ${.IMPSRC} -o ${.TARGET} $(CFLAGS) $(CPPFLAGS)
 
 $(QCVM): $(OBJ_X)
        $(CC) -o ${.TARGET} ${.IMPSRC} $(LDFLAGS) $(LIBS) $(OBJ_X)
@@ -74,18 +70,14 @@ check: all
 test: all
        @ ./$(TESTSUITE)
 
+strip: $(GMQCC) $(QCVM) $(TESTSUITE)
+       strip $(GMQCC)
+       strip $(QCVM)
+       strip $(TESTSUITE)
+
 clean:
        rm -rf *.o $(GMQCC) $(QCVM) $(TESTSUITE) $(PAK) *.dat gource.mp4 *.exe gm-qcc.tgz ./cov-int
 
-splint:
-       @ splint $(SPLINTFLAGS) *.c *.h
-
-gource:
-       @ gource $(GOURCEFLAGS)
-
-gource-record:
-       @ gource $(GOURCEFLAGS) -o - | ffmpeg $(FFMPEGFLAGS) gource.mp4
-
 depend:
        @makedepend -Y -f BSDmakefile -w 65536 2> /dev/null ${DEPS:C/\.o/.c/g}
 
@@ -118,9 +110,11 @@ ast.o: gmqcc.h opts.def ast.h ir.h parser.h lexer.h
 code.o: gmqcc.h opts.def
 conout.o: gmqcc.h opts.def
 correct.o: gmqcc.h opts.def
+exec.o: gmqcc.h opts.def
 fold.o: ast.h ir.h gmqcc.h opts.def parser.h lexer.h
 fs.o: gmqcc.h opts.def platform.h
 ftepp.o: gmqcc.h opts.def lexer.h
+hash.o: gmqcc.h opts.def
 intrin.o: parser.h gmqcc.h opts.def lexer.h ast.h ir.h
 ir.o: gmqcc.h opts.def ir.h
 lexer.o: gmqcc.h opts.def lexer.h