
#PARALLEL: linux - debug
#CFLAGS= -g -DQUAD -D__linux__ -DSERVERONLY -DMY_PARALLEL -DMY_PAR_TIMER -DMY_PAR_STATS -Iserver -Iclient -I./../ -I./../../../x86-counters -Wall
#CFLAGS=-DSERVERONLY -DESEMPENHO -I./../server -I./../client -I./../ -O6 -Wall -fomit-frame-pointer -fno-strength-reduce -m32 -debug
CFLAGS=-DSERVERONLY -D_GNU_SOURCE -Iserver -Iclient -I./../ -g -O3 -m32

#PARALLEL: linux - perf
#CFLAGS= -O2 -DQUAD -D__linux__ -DSERVERONLY -DMY_PARALLEL -DMY_PAR_TIMER -DMY_PAR_STATS -I./../server -I./../client -I./../ -I./../../../x86-counters -Wall

#SEQ: linux - debug
#CFLAGS= -g -DQUAD -DMY_TIMER -D__linux__ -DSERVERONLY -I./../server -I./../client -I./../ -I./../../../x86-counters -Wall

#SEQ: linux - perf
#CFLAGS= -O2 -DQUAD -DMY_TIMER -D__linux__ -DSERVERONLY -I./../server -I./../client -I./../ -I./../../../x86-counters -Wall


#PARALLEL: linux
LDFLAGS = -lm -lpthread

#SEQ: linux
#LDFLAGS = -lm


HEADERS =\
	 client/bothdefs.h \
	 ./../client/bspfile.h \
	 ./../client/cdaudio.h \
	 ./../client/client.h \
	 ./../client/cmd.h \
	 ../client/common.h \
	 ../client/console.h \
	 ../client/crc.h \
	 ../client/cvar.h \
	 ../client/d_iface.h \
	 ../client/draw.h \
	 ../client/input.h \
	 ../client/keys.h \
	 ../client/mathlib.h \
	 ../client/menu.h \
	 ../client/model.h \
	 ../client/modelgen.h \
	 ../client/net.h \
	 ../client/pmove.h \
	 pr_comp.h \
	 progdefs.h \
	 progs.h \
	 ../client/protocol.h \
	 ../client/quakedef.h \
	 qwsvdef.h \
	 ../client/render.h \
	 ../client/sbar.h \
	 ../client/screen.h \
	 server.h \
	 ../client/sound.h \
	 ../client/spritegn.h \
	 sys.h \
	 ../client/vid.h \
	 ../client/view.h \
	 ../client/wad.h \
	 ../client/winquake.h \
	 world.h \
	 ../client/zone.h 
#	../../../x86-counters/aak_time_meas.h

EXE = qwsv

#	 ../../../x86-counters/time_586.o \

OFILES = \
		 client/cmd.o \
		 client/common.o \
		 client/crc.o \
		 client/cvar.o \
		 client/mathlib.o \
		 client/zone.o \
		 client/pmove.o \
		 client/pmovetst.o \
		 client/net_chan.o \
		 client/net_udp.o \
		 client/md4.o \
         	 server/pr_cmds.o \
		 server/pr_edict.o \
		 server/pr_exec.o \
		 server/sv_init.o \
		 server/sv_ccmds.o \
		 server/sv_main.o \
		 server/sv_ents.o \
		 server/sv_send.o \
		 server/sv_move.o \
		 server/sv_phys.o \
		 server/sv_user.o \
		 server/world.o \
		 server/sv_nchan.o \
         	 server/sys_unix.o \
		 server/model.o


#linux complains about -mt
#$(EXE) : $(OFILES)
#	cc -mt $(CFLAGS) -o $(EXE) $(OFILES) $(LDFLAGS) 

$(EXE) : $(OFILES)
	gcc $(CFLAGS) -o $(EXE) $(OFILES) $(LDFLAGS) 

clean:
	rm -f $(OFILES) $(EXE)

app:
	make "CFLAGS = -O4 -g -Wall  -I../client  -DSERVERONLY"

profile:
	make "CFLAGS = -g -pg -O -Wall -I../client -DPROFILE"
	cp $(EXE) /LocalApps

.c.o: ; cc -c $(CFLAGS) -o $@ $*.c 
.s.o: ; cc -c $(CFLAGS) -o $@ $*.s

