]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - Makefile
Merge branch 'master' into test-suite
[xonotic/gmqcc.git] / Makefile
index c261b4e687b41aaeac5b757df03d4b54b3912eff..aa5ef11f11b60b2f9955c596c60b522e78c4dde4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,7 @@
+DESTDIR :=
+PREFIX := /usr/local
+BINDIR := $(PREFIX)/bin
+
 CC     ?= clang
 CFLAGS += -Wall -I. -fomit-frame-pointer -fno-stack-protector -fno-common
 #turn on tons of warnings if clang is present
@@ -19,18 +23,19 @@ ifeq ($(track), no)
     CFLAGS += -DNOTRACK
 endif
 
-OBJ     = \
+OBJ     =             \
           util.o      \
           code.o      \
           ast.o       \
           ir.o        \
-          con.o
-          
+          con.o       \
+          ftepp.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
 
-#default is compiler only
+
 default: gmqcc
 %.o: %.c
        $(CC) -c $< -o $@ $(CFLAGS)
@@ -50,14 +55,22 @@ test: $(OBJ_T)
 runtests:
        ./test
 
-#all target is test and all
 all: gmqcc qcvm test
 
 clean:
        rm -f *.o gmqcc qcvm test *.dat
-       
+
+
 $(OBJ) $(OBJ_C) $(OBJ_X): gmqcc.h
 main.o: lexer.h
 parser.o: ast.h lexer.h
 ast.o: ast.h ir.h
 ir.o: ir.h
+
+install: install-gmqcc install-qcvm
+install-gmqcc: gmqcc
+       install -d -m755          $(DESTDIR)$(BINDIR)
+       install    -m755  gmqcc   $(DESTDIR)$(BINDIR)/gmqcc
+install-qcvm: qcvm
+       install -d -m755          $(DESTDIR)$(BINDIR)
+       install    -m755  qcvm    $(DESTDIR)$(BINDIR)/qcvm