2000-06-05 00:00:00 +00:00
|
|
|
#
|
2002-12-23 00:00:00 +00:00
|
|
|
# Half-Life Full SDK 2.3 hl_i386.so Makefile for x86 Linux
|
2000-06-05 00:00:00 +00:00
|
|
|
#
|
2002-12-23 00:00:00 +00:00
|
|
|
# October 2002 by Leon Hartwig (hartwig@valvesoftware.com)
|
2000-06-05 00:00:00 +00:00
|
|
|
#
|
|
|
|
|
2002-12-23 00:00:00 +00:00
|
|
|
DLLNAME=hl
|
2000-06-05 00:00:00 +00:00
|
|
|
|
|
|
|
ARCH=i386
|
|
|
|
|
|
|
|
#make sure this is the correct compiler for your system
|
|
|
|
CC=gcc
|
|
|
|
|
|
|
|
DLL_SRCDIR=.
|
2001-08-29 00:00:00 +00:00
|
|
|
ENGINE_SRCDIR=../engine
|
|
|
|
COMMON_SRCDIR=../common
|
2000-06-05 00:00:00 +00:00
|
|
|
WPN_SHARED_SRCDIR=./wpn_shared
|
|
|
|
PM_SHARED_SRCDIR=../pm_shared
|
2001-08-29 00:00:00 +00:00
|
|
|
GAME_SHARED_SRCDIR=../game_shared
|
2000-06-05 00:00:00 +00:00
|
|
|
|
|
|
|
DLL_OBJDIR=$(DLL_SRCDIR)/obj
|
|
|
|
WPN_SHARED_OBJDIR=$(WPN_SHARED_SRCDIR)/obj
|
|
|
|
PM_SHARED_OBJDIR=$(PM_SHARED_SRCDIR)/obj
|
2001-08-29 00:00:00 +00:00
|
|
|
GAME_SHARED_OBJDIR=$(GAME_SHARED_SRCDIR)/obj
|
2000-06-05 00:00:00 +00:00
|
|
|
|
2001-08-29 00:00:00 +00:00
|
|
|
BASE_CFLAGS= -Dstricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp \
|
|
|
|
-DCLIENT_WEAPONS
|
2000-06-05 00:00:00 +00:00
|
|
|
|
|
|
|
#safe optimization
|
|
|
|
CFLAGS=$(BASE_CFLAGS) -w -m486 -O1
|
|
|
|
|
|
|
|
#full optimization
|
2001-08-29 00:00:00 +00:00
|
|
|
#CFLAGS=$(BASE_CFLAGS) -w -O1 -m486 -ffast-math -funroll-loops \
|
|
|
|
-fomit-frame-pointer -fexpensive-optimizations \
|
|
|
|
-malign-loops=2 -malign-jumps=2 -malign-functions=2
|
2000-06-05 00:00:00 +00:00
|
|
|
|
|
|
|
#use these when debugging
|
|
|
|
#CFLAGS=$(BASE_CFLAGS) -g
|
|
|
|
|
2001-08-29 00:00:00 +00:00
|
|
|
INCLUDEDIRS=-I. -I$(ENGINE_SRCDIR) -I$(COMMON_SRCDIR) -I$(PM_SHARED_SRCDIR) -I$(GAME_SHARED_SRCDIR)
|
2000-06-05 00:00:00 +00:00
|
|
|
|
|
|
|
LDFLAGS=
|
|
|
|
|
|
|
|
SHLIBEXT=so
|
|
|
|
SHLIBCFLAGS=-fPIC
|
|
|
|
SHLIBLDFLAGS=-shared
|
|
|
|
|
|
|
|
DO_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) $(INCLUDEDIRS) -o $@ -c $<
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# SETUP AND BUILD
|
|
|
|
# GAME
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
$(DLL_OBJDIR)/%.o: $(DLL_SRCDIR)/%.cpp
|
|
|
|
$(DO_CC)
|
|
|
|
|
|
|
|
$(WPN_SHARED_OBJDIR)/%.o: $(WPN_SHARED_SRCDIR)/%.cpp
|
|
|
|
$(DO_CC)
|
|
|
|
|
2001-08-29 00:00:00 +00:00
|
|
|
$(GAME_SHARED_OBJDIR)/%.o: $(GAME_SHARED_SRCDIR)/%.cpp
|
|
|
|
$(DO_CC)
|
|
|
|
|
2000-06-05 00:00:00 +00:00
|
|
|
$(PM_SHARED_OBJDIR)/%.o: $(PM_SHARED_SRCDIR)/%.c
|
|
|
|
$(DO_CC)
|
|
|
|
|
|
|
|
OBJ = \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/aflock.o \
|
|
|
|
$(DLL_OBJDIR)/agrunt.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/airtank.o \
|
|
|
|
$(DLL_OBJDIR)/animating.o \
|
|
|
|
$(DLL_OBJDIR)/animation.o \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/apache.o \
|
|
|
|
$(DLL_OBJDIR)/barnacle.o \
|
|
|
|
$(DLL_OBJDIR)/barney.o \
|
|
|
|
$(DLL_OBJDIR)/bigmomma.o \
|
|
|
|
$(DLL_OBJDIR)/bloater.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/bmodels.o \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/bullsquid.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/buttons.o \
|
|
|
|
$(DLL_OBJDIR)/cbase.o \
|
|
|
|
$(DLL_OBJDIR)/client.o \
|
|
|
|
$(DLL_OBJDIR)/combat.o \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/controller.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/crossbow.o \
|
|
|
|
$(DLL_OBJDIR)/crowbar.o \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/defaultai.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/doors.o \
|
|
|
|
$(DLL_OBJDIR)/effects.o \
|
|
|
|
$(DLL_OBJDIR)/egon.o \
|
|
|
|
$(DLL_OBJDIR)/explode.o \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/flyingmonster.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/func_break.o \
|
|
|
|
$(DLL_OBJDIR)/func_tank.o \
|
|
|
|
$(DLL_OBJDIR)/game.o \
|
|
|
|
$(DLL_OBJDIR)/gamerules.o \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/gargantua.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/gauss.o \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/genericmonster.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/ggrenade.o \
|
|
|
|
$(DLL_OBJDIR)/globals.o \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/gman.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/h_ai.o \
|
|
|
|
$(DLL_OBJDIR)/h_battery.o \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/h_cine.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/h_cycler.o \
|
|
|
|
$(DLL_OBJDIR)/h_export.o \
|
|
|
|
$(DLL_OBJDIR)/handgrenade.o \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/hassassin.o \
|
|
|
|
$(DLL_OBJDIR)/headcrab.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/healthkit.o \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/hgrunt.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/hornet.o \
|
|
|
|
$(DLL_OBJDIR)/hornetgun.o \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/houndeye.o \
|
|
|
|
$(DLL_OBJDIR)/ichthyosaur.o \
|
|
|
|
$(DLL_OBJDIR)/islave.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/items.o \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/leech.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/lights.o \
|
|
|
|
$(DLL_OBJDIR)/maprules.o \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/monstermaker.o \
|
|
|
|
$(DLL_OBJDIR)/monsters.o \
|
|
|
|
$(DLL_OBJDIR)/monsterstate.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/mortar.o \
|
|
|
|
$(DLL_OBJDIR)/mp5.o \
|
|
|
|
$(DLL_OBJDIR)/multiplay_gamerules.o \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/nihilanth.o \
|
|
|
|
$(DLL_OBJDIR)/nodes.o \
|
|
|
|
$(DLL_OBJDIR)/osprey.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/pathcorner.o \
|
|
|
|
$(DLL_OBJDIR)/plane.o \
|
|
|
|
$(DLL_OBJDIR)/plats.o \
|
|
|
|
$(DLL_OBJDIR)/player.o \
|
|
|
|
$(DLL_OBJDIR)/python.o \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/rat.o \
|
|
|
|
$(DLL_OBJDIR)/roach.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/rpg.o \
|
|
|
|
$(DLL_OBJDIR)/satchel.o \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/schedule.o \
|
|
|
|
$(DLL_OBJDIR)/scientist.o \
|
|
|
|
$(DLL_OBJDIR)/scripted.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/shotgun.o \
|
|
|
|
$(DLL_OBJDIR)/singleplay_gamerules.o \
|
|
|
|
$(DLL_OBJDIR)/skill.o \
|
|
|
|
$(DLL_OBJDIR)/sound.o \
|
|
|
|
$(DLL_OBJDIR)/soundent.o \
|
|
|
|
$(DLL_OBJDIR)/spectator.o \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/squadmonster.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/squeakgrenade.o \
|
|
|
|
$(DLL_OBJDIR)/subs.o \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/talkmonster.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/teamplay_gamerules.o \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/tempmonster.o \
|
|
|
|
$(DLL_OBJDIR)/tentacle.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/triggers.o \
|
|
|
|
$(DLL_OBJDIR)/tripmine.o \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/turret.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/util.o \
|
|
|
|
$(DLL_OBJDIR)/weapons.o \
|
|
|
|
$(DLL_OBJDIR)/world.o \
|
|
|
|
$(DLL_OBJDIR)/xen.o \
|
2002-12-23 00:00:00 +00:00
|
|
|
$(DLL_OBJDIR)/zombie.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(WPN_SHARED_OBJDIR)/hl_wpn_glock.o \
|
2001-08-29 00:00:00 +00:00
|
|
|
$(GAME_SHARED_OBJDIR)/voice_gamemgr.o \
|
2000-06-05 00:00:00 +00:00
|
|
|
$(PM_SHARED_OBJDIR)/pm_debug.o \
|
|
|
|
$(PM_SHARED_OBJDIR)/pm_math.o \
|
|
|
|
$(PM_SHARED_OBJDIR)/pm_shared.o
|
|
|
|
|
|
|
|
$(DLLNAME)_$(ARCH).$(SHLIBEXT) : neat $(OBJ)
|
|
|
|
$(CC) $(CFLAGS) $(SHLIBLDFLAGS) $(LDFLAGS) -o $@ $(OBJ)
|
|
|
|
|
|
|
|
neat:
|
|
|
|
-mkdir $(DLL_OBJDIR)
|
|
|
|
-mkdir $(WPN_SHARED_OBJDIR)
|
2001-08-29 00:00:00 +00:00
|
|
|
-mkdir $(GAME_SHARED_OBJDIR)
|
2000-06-05 00:00:00 +00:00
|
|
|
-mkdir $(PM_SHARED_OBJDIR)
|
|
|
|
clean:
|
|
|
|
-rm -f $(OBJ)
|
|
|
|
-rm -f $(DLLNAME)_$(ARCH).$(SHLIBEXT)
|
|
|
|
spotless: clean
|
|
|
|
-rm -r $(DLL_OBJDIR)
|
|
|
|
-rm -r $(WPN_SHARED_OBJDIR)
|
2001-08-29 00:00:00 +00:00
|
|
|
-rm -r $(GAME_SHARED_OBJDIR)
|
2000-06-05 00:00:00 +00:00
|
|
|
-rm -r $(PM_SHARED_OBJDIR)
|
|
|
|
|