]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - include.mk
Constant fold intrinsics if their arguments are constant. TODO: reference count intri...
[xonotic/gmqcc.git] / include.mk
index f4b118b7c0630a165bef4651b3319d7a68b25a26..20ffdd48aad6b4eafb5569fcf50e56a8fc0110f4 100644 (file)
@@ -16,7 +16,7 @@ LIBS    += -lm
 #objects
 OBJ_C = main.o lexer.o parser.o fs.o stat.o util.o code.o ast.o ir.o conout.o ftepp.o opts.o utf8.o correct.o fold.o intrin.o
 OBJ_P = util.o fs.o conout.o opts.o pak.o stat.o
-OBJ_T = test.o util.o conout.o fs.o stat.o
+OBJ_T = test.o util.o opts.o conout.o fs.o stat.o
 OBJ_X = exec-standalone.o util.o opts.o conout.o fs.o stat.o
 
 #gource flags
@@ -95,7 +95,7 @@ SPLINTFLAGS =                 \
     -abstract                 \
     -statictrans              \
     -castfcnptr
-    
+
 #always the right rule
 default: all
 
@@ -107,3 +107,14 @@ uninstall:
        rm -f $(DESTDIR)$(MANDIR)/man1/doc/gmqcc.1
        rm -f $(DESTDIR)$(MANDIR)/man1/doc/qcvm.1
        rm -f $(DESTDIR)$(MANDIR)/man1/doc/gmqpak.1
+
+STYLE_MATCH = \( -name '*.[ch]' -or -name '*.def' -or -name '*.qc' \)
+
+whitespace:
+       find . -type f $(STYLE_MATCH) -exec sed -i 's/ *$$//' '{}' ';'
+newline:
+       find . -type f $(STYLE_MATCH) -exec sed -i -e '$$a\' '{}' ';'
+indent:
+       find . -type f $(STYLE_MATCH) -exec sed -i 's/\t/    /g' '{}' ';'
+
+style: whitespace newline indent