Added Makefile
This commit is contained in:
parent
2186d5f3f9
commit
190a6b306b
4 changed files with 1089 additions and 0 deletions
61
Makefile
Normal file
61
Makefile
Normal file
|
@ -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.
|
Loading…
Add table
Add a link
Reference in a new issue