From 91c5fa3d9e12635306ecec705c5e6fdf0e32fa74 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sat, 22 Dec 2001 05:37:39 +0000 Subject: [PATCH] almost links --- ctf/q_shared.h | 8 +- game/q_shared.h | 8 +- linux/net_udp.c | 2 +- linux/qasm.h | 8 +- linux/vid_menu.c | 8 +- makefile | 321 +++++++++-------------------------------------- 6 files changed, 79 insertions(+), 276 deletions(-) diff --git a/ctf/q_shared.h b/ctf/q_shared.h index b10b741..08b5286 100644 --- a/ctf/q_shared.h +++ b/ctf/q_shared.h @@ -39,11 +39,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include -#if (defined _M_IX86 || defined __i386__) && !defined C_ONLY && !defined __sun__ -#define id386 1 -#else +//#if (defined _M_IX86 || defined __i386__) && !defined C_ONLY && !defined __sun__ +//#define id386 1 +//#else #define id386 0 -#endif +//#endif #if defined _M_ALPHA && !defined C_ONLY #define idaxp 1 diff --git a/game/q_shared.h b/game/q_shared.h index b10b741..08b5286 100644 --- a/game/q_shared.h +++ b/game/q_shared.h @@ -39,11 +39,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include -#if (defined _M_IX86 || defined __i386__) && !defined C_ONLY && !defined __sun__ -#define id386 1 -#else +//#if (defined _M_IX86 || defined __i386__) && !defined C_ONLY && !defined __sun__ +//#define id386 1 +//#else #define id386 0 -#endif +//#endif #if defined _M_ALPHA && !defined C_ONLY #define idaxp 1 diff --git a/linux/net_udp.c b/linux/net_udp.c index 81b15b3..358cfe1 100644 --- a/linux/net_udp.c +++ b/linux/net_udp.c @@ -468,7 +468,7 @@ int NET_Socket (char *net_interface, int port) return 0; } - if (!net_interface || !net_interface[0] || !stricmp(net_interface, "localhost")) + if (!net_interface || !net_interface[0] || !strcasecmp(net_interface, "localhost")) address.sin_addr.s_addr = INADDR_ANY; else NET_StringToSockaddr (net_interface, (struct sockaddr *)&address); diff --git a/linux/qasm.h b/linux/qasm.h index 6931bd7..f914175 100644 --- a/linux/qasm.h +++ b/linux/qasm.h @@ -18,11 +18,11 @@ #endif -#ifdef __i386__ -#define id386 1 -#else +//#ifdef __i386__ +//#define id386 1 +//#else #define id386 0 -#endif +//#endif // !!! must be kept the same as in d_iface.h !!! #define TRANSPARENT_COLOR 255 diff --git a/linux/vid_menu.c b/linux/vid_menu.c index c85a131..6db42a2 100644 --- a/linux/vid_menu.c +++ b/linux/vid_menu.c @@ -82,8 +82,8 @@ static void BrightnessCallback( void *s ) else s_brightness_slider[0].curvalue = s_brightness_slider[1].curvalue; - if ( stricmp( vid_ref->string, "soft" ) == 0 || - stricmp( vid_ref->string, "softx" ) == 0 ) + if ( strcasecmp( vid_ref->string, "soft" ) == 0 || + strcasecmp( vid_ref->string, "softx" ) == 0 ) { float gamma = ( 0.8 - ( slider->curvalue/10.0 - 0.5 ) ) + 0.5; @@ -140,12 +140,12 @@ static void ApplyChanges( void *unused ) ** update appropriate stuff if we're running OpenGL and gamma ** has been modified */ - if ( stricmp( vid_ref->string, "gl" ) == 0 ) + if ( strcasecmp( vid_ref->string, "gl" ) == 0 ) { if ( vid_gamma->modified ) { vid_ref->modified = true; - if ( stricmp( gl_driver->string, "3dfxgl" ) == 0 ) + if ( strcasecmp( gl_driver->string, "3dfxgl" ) == 0 ) { char envbuffer[1024]; float g; diff --git a/makefile b/makefile index 79bf919..a794b43 100644 --- a/makefile +++ b/makefile @@ -1,259 +1,62 @@ - -CFLAGS = -Wall -c -g -DNO_PRIVATE -LDFLAGS = -sectcreate __ICON __header rhapsody/QuakeWorld.iconheader -segprot __ICON r r -sectcreate __ICON app rhapsody/QuakeWorld.tiff -framework AppKit -framework Foundation -ODIR = rhapsody/output - -EXEBASE = QuakeWorld -EXE = $(ODIR)/$(EXEBASE) -all: $(EXE) - -_next: - make "CFLAGS = -Wall -c -g -DNO_PRIVATE" "ODIR = rhapsody/output" - -_nextopt: - make "CFLAGS = -O2 -c -g -DNO_PRIVATE" "ODIR = rhapsody/output" - -_irix: - make "CFLAGS = -c -Ofast=ip32_10k -Xcpluscomm -DNO_PRIVATE" "LDFLAGS = -Ofast=ip32_10k -lm" "ODIR = irix" - -_osf: - make "CFLAGS = -c -O4 -DNO_PRIVATE" "LDFLAGS = -lm" "ODIR = osf" - -clean: - rm -f $(ODIR)/*.o $(EXE) - -REF_SOFT_SYSTEM_FILES = $(ODIR)/r_next.o - -REF_SOFT_FILES = $(ODIR)/d_polyse.o $(ODIR)/d_scan.o $(ODIR)/draw.o $(ODIR)/model.o $(ODIR)/r_aclip.o $(ODIR)/r_alias.o $(ODIR)/r_bsp.o $(ODIR)/r_draw.o $(ODIR)/r_edge.o $(ODIR)/r_efrag.o $(ODIR)/r_inter.o $(ODIR)/r_light.o $(ODIR)/r_main.o $(ODIR)/r_misc.o $(ODIR)/r_part.o $(ODIR)/r_sky.o $(ODIR)/r_sprite.o $(ODIR)/r_surf.o $(REF_SOFT_SYSTEM_FILES) - -CLIENT_SYSTEM_FILES = $(ODIR)/in_next.o $(ODIR)/cd_null.o $(ODIR)/snd_next.o $(ODIR)/vid_null.o -SOUND_FILES = $(ODIR)/snd_dma.o $(ODIR)/snd_mix.o $(ODIR)/snd_mem.o -CLIENT_FILES = $(ODIR)/cl_demo.o $(ODIR)/cl_ents.o $(ODIR)/cl_input.o $(ODIR)/cl_main.o $(ODIR)/cl_parse.o $(ODIR)/cl_pred.o $(ODIR)/cl_tent.o $(ODIR)/console.o $(ODIR)/keys.o $(ODIR)/menu.o $(ODIR)/sbar.o $(ODIR)/screen.o $(ODIR)/view.o $(SOUND_FILES) $(CLIENT_SYSTEM_FILES) $(REF_SOFT_FILES) -#CLIENT_FILES = $(ODIR)/cl_null.o - - -SERVER_FILES = $(ODIR)/pr_cmds.o $(ODIR)/pr_edict.o $(ODIR)/pr_exec.o $(ODIR)/sv_ccmds.o $(ODIR)/sv_ents.o $(ODIR)/sv_init.o $(ODIR)/sv_main.o $(ODIR)/sv_move.o $(ODIR)/sv_phys.o $(ODIR)/sv_send.o $(ODIR)/sv_user.o $(ODIR)/world.o -#SERVER_FILES = $(ODIR)/sv_null.o - - -QCOMMON_SYSTEM_FILES = $(ODIR)/net_udp.o $(ODIR)/sys_next.o -QCOMMON_FILES = $(ODIR)/cmd.o $(ODIR)/cmodel.o $(ODIR)/common.o $(ODIR)/crc.o $(ODIR)/cvar.o $(ODIR)/files.o $(ODIR)/mathlib.o $(ODIR)/net_chan.o $(ODIR)/pmove.o $(QCOMMON_SYSTEM_FILES) - -$(EXE): $(CLIENT_FILES) $(SERVER_FILES) $(QCOMMON_FILES) - cc -o $(EXE) $(CLIENT_FILES) $(SERVER_FILES) $(QCOMMON_FILES) $(LDFLAGS) - -#=========================================================================== - -$(ODIR)/cl_null.o : client/cl_null.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i - -$(ODIR)/cl_demo.o : client/cl_demo.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/cl_ents.o : client/cl_ents.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/cl_input.o : client/cl_input.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/cl_main.o : client/cl_main.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/cl_parse.o : client/cl_parse.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/cl_pred.o : client/cl_pred.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/cl_tent.o : client/cl_tent.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/console.o : client/console.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/keys.o : client/keys.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/menu.o : client/menu.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/sbar.o : client/sbar.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/screen.o : client/screen.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/view.o : client/view.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i - -$(ODIR)/snd_dma.o : client/snd_dma.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/snd_mix.o : client/snd_mix.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/snd_mem.o : client/snd_mem.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i - -$(ODIR)/cd_null.o : client/cd_null.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/in_null.o : client/in_null.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/snd_null.o : client/snd_null.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/vid_null.o : client/vid_null.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i - -$(ODIR)/in_next.o : rhapsody/in_next.m - cc $(CFLAGS) -o $@ $? -$(ODIR)/snd_next.o : rhapsody/snd_next.m - cc $(CFLAGS) -o $@ $? - -#=========================================================================== - -$(ODIR)/sv_null.o : server/sv_null.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i - -$(ODIR)/pr_cmds.o : server/pr_cmds.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/pr_edict.o : server/pr_edict.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/pr_exec.o : server/pr_exec.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/sv_ccmds.o : server/sv_ccmds.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/sv_ents.o : server/sv_ents.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/sv_init.o : server/sv_init.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/sv_main.o : server/sv_main.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/sv_move.o : server/sv_move.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/sv_phys.o : server/sv_phys.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/sv_send.o : server/sv_send.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/sv_user.o : server/sv_user.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/world.o : server/world.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i - -#=========================================================================== - -$(ODIR)/d_polyse.o : ref_soft/d_polyse.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/d_scan.o : ref_soft/d_scan.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/draw.o : ref_soft/draw.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/model.o : ref_soft/model.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/r_aclip.o : ref_soft/r_aclip.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/r_alias.o : ref_soft/r_alias.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/r_bsp.o : ref_soft/r_bsp.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/r_draw.o : ref_soft/r_draw.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/r_edge.o : ref_soft/r_edge.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/r_efrag.o : ref_soft/r_efrag.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/r_inter.o : ref_soft/r_inter.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/r_light.o : ref_soft/r_light.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/r_main.o : ref_soft/r_main.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/r_misc.o : ref_soft/r_misc.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/r_part.o : ref_soft/r_part.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/r_sky.o : ref_soft/r_sky.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/r_sprite.o : ref_soft/r_sprite.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/r_surf.o : ref_soft/r_surf.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i - -$(ODIR)/r_next.o : rhapsody/r_next.m - cc $(CFLAGS) -o $@ $? - -#=========================================================================== - -$(ODIR)/cmd.o : qcommon/cmd.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/cmodel.o : qcommon/cmodel.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/common.o : qcommon/common.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/crc.o : qcommon/crc.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/cvar.o : qcommon/cvar.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/files.o : qcommon/files.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/mathlib.o : qcommon/mathlib.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/net_chan.o : qcommon/net_chan.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/net_udp.o : qcommon/net_udp.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/pmove.o : qcommon/pmove.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i - -$(ODIR)/sys_null.o : qcommon/sys_null.c - cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i - cc $(CFLAGS) -o $@ /tmp/temp.i -$(ODIR)/sys_next.o : rhapsody/sys_next.m - cc $(CFLAGS) -o $@ $? +MAKEDEPS=$(CC) -MM $(CPPFLAGS) $< | sed -e 's!$*\.o:*!$*\.o $@:!g' > $@ + +%.d: %.c + $(MAKEDEPS) + +sources=\ + client/cl_cin.c \ + client/cl_ents.c \ + client/cl_fx.c \ + client/cl_input.c \ + client/cl_inv.c \ + client/cl_main.c \ + client/cl_newfx.c \ + client/cl_parse.c \ + client/cl_pred.c \ + client/cl_scrn.c \ + client/cl_tent.c \ + client/cl_view.c \ + client/console.c \ + client/keys.c \ + client/menu.c \ + client/qmenu.c \ + client/snd_dma.c \ + client/snd_mem.c \ + client/snd_mix.c \ + client/x86.c \ + game/m_flash.c \ + game/q_shared.c \ + linux/cd_linux.c \ + linux/net_udp.c \ + linux/q_shlinux.c \ + linux/snd_linux.c \ + linux/sys_linux.c \ + linux/vid_so.c \ + linux/vid_menu.c \ + qcommon/cmd.c \ + qcommon/cmodel.c \ + qcommon/common.c \ + qcommon/crc.c \ + qcommon/cvar.c \ + qcommon/files.c \ + qcommon/md4.c \ + qcommon/net_chan.c \ + qcommon/pmove.c \ + server/sv_ccmds.c \ + server/sv_ents.c \ + server/sv_game.c \ + server/sv_init.c \ + server/sv_main.c \ + server/sv_send.c \ + server/sv_user.c \ + server/sv_world.c + +objects=$(patsubst %.s,%.o,\ + $(patsubst %.c,%.o,\ + $(patsubst %.cc,%.o,\ + $(sources)))) + +quake2: $(objects) + gcc -o $@ $^ -lm -ldl + +-include $(objects:.o=.d)