avp/Makefile

68 lines
2.4 KiB
Makefile
Raw Normal View History

2001-07-04 19:35:37 +00:00
CC = gcc
NASM = nasm
2001-07-28 01:21:46 +00:00
CFLAGS = -g -Wall -I. -Iinclude -Iwin95 -Iavp -Iavp/win95 -Iavp/support -Iavp/win95/frontend -Iavp/win95/gadgets
2001-07-27 21:41:02 +00:00
CXXFLAGS = $(CFLAGS)
2001-07-04 19:35:37 +00:00
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 frustum.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
2001-07-28 01:21:46 +00:00
AVP = ai_sight.c avpview.c bh_agun.c bh_ais.c bh_alien.c bh_binsw.c bh_cable.c bh_corpse.c bh_deathvol.c bh_debri.c bh_dummy.c bh_fan.c bh_far.c bh_fhug.c bh_gener.c bh_ldoor.c bh_lift.c bh_light.c bh_lnksw.c bh_ltfx.c bh_marin.c bh_mission.c bh_near.c bh_pargen.c bh_plachier.c bh_plift.c bh_pred.c bh_queen.c bh_rubberduck.c bh_selfdest.c bh_snds.c bh_spcl.c bh_swdor.c bh_track.c bh_types.c bh_videoscreen.c bh_waypt.c bh_weap.c bh_xeno.c bonusabilities.c cheatmodes.c comp_map.c comp_shp.c consolelog.cpp deaths.c decal.c detaillevels.c dynamics.c dynblock.c equipmnt.c equiputl.cpp extents.c game.c gameflow.c hmodel.c hud.c inventry.c language.c lighting.c load_shp.c los.c maps.c mempool.c messagehistory.c movement.c paintball.c particle.c pfarlocs.c pheromon.c pmove.c psndproj.c pvisible.c
# unused?: avpitems.cpp avppages.cpp
# not needed: mp_launch.c
# need fix: cconvars.cpp cdtrackselection.cpp davehook.cpp game_statistics.c gamecmds.cpp gamevars.cpp missions.cpp player.c psnd.c
2001-07-04 19:35:37 +00:00
# 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))
2001-07-27 21:41:02 +00:00
AVPSRC = $(call SRCNAMES,$(AVP),avp)
AVPOBJ = $(call OBJNAMES,$(AVP),avp)
2001-07-04 19:35:37 +00:00
2001-07-27 21:41:02 +00:00
SRC = $(ROOTSRC) $(AVPSRC)
OBJ = $(ROOTOBJ) $(AVPOBJ)
2001-07-04 19:35:37 +00:00
.SUFFIXES: .asm
2001-07-27 21:41:02 +00:00
all: AvP
2001-07-04 19:35:37 +00:00
2001-07-27 21:41:02 +00:00
AvP: depend $(OBJ)
gcc -o AvP $(OBJ) $(LDLIBS)
2001-07-04 19:35:37 +00:00
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.