summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSteven Fuller <relnev@icculus.org>2001-07-04 19:35:37 +0000
committerPatryk Obara <dreamer.tan@gmail.com>2019-08-20 02:22:36 +0200
commit190a6b306be7da0761bda6a5882349e161230d30 (patch)
treeaf36af10a05a8569573678bf1d8a44c2e1744aa5 /Makefile
parent2186d5f3f95cd74a070a490d899291648d58667a (diff)
Added Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile61
1 files changed, 61 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..9ce2054
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,61 @@
+CC = gcc
+NASM = nasm
+
+CFLAGS = -g -Wall -Iinclude -Iwin95 -Iavp -Iavp/win95 -Iavp/support -Iavp/win95/frontend
+LDLIBS = -lm # /home/relnev/ElectricFence-2.2.2/libefence.a
+
+CFLAGS += `sdl-config --cflags`
+LDLIBS += `sdl-config --libs`
+
+AFLAGS = -g -Iinclude/ -w+macro-params -w+orphan-labels -w+number-overflow
+
+ROOT = afont.c frustrum.c kshape.c map.c maths.c mem3dc.c mem3dcpp.cpp module.c morph.c mslhand.c object.c shpanim.c sphere.c tables.c vdb.c version.c
+
+# the following should really be autogenerated...
+
+SRCNAMES = $(addprefix $(2)/,$(1))
+OBJNAMES = $(addprefix $(2)/,$(addsuffix .o,$(basename $(1))))
+OBJNAMES1 = $(addsuffix .o,$(basename $(1)))
+
+ROOTSRC = $(ROOT)
+ROOTOBJ = $(call OBJNAMES1,$(ROOT))
+
+
+SRC = $(ROOTSRC)
+OBJ = $(ROOTOBJ)
+
+.SUFFIXES: .asm
+
+all: avp
+
+avp: depend $(OBJ)
+ gcc -o avp $(OBJ) $(LDLIBS)
+
+compile: $(OBJ)
+
+.asm.o:
+ $(NASM) $(AFLAGS) -f elf -o $@ $<
+
+tester:
+ echo $(OBJ)
+
+clean:
+ -rm -rf depend $(OBJ)
+
+distclean: clean
+ -rm -rf `find . -name "*~"`
+
+# I wish I knew how to do dependencies correctly...
+
+#depend: Makefile $(SRC)
+# $(CC) $(CFLAGS) -MM $(SRC) > depend
+
+# insert makefile dependencies here
+# -include depend
+
+depend: Makefile # $(SRC)
+ touch depend
+ makedepend -fdepend -- $(CFLAGS) -- $(SRC)
+
+-include depend
+# DO NOT DELETE THIS LINE -- make depend depends on it.