quake2forge/src/Makefile.am
Jamie Wilkinson 8ccc351f99 - Applied NetBSD patch from Quentin Garnier.
- Added a configure test for ossaudio for NetBSD.
- Added a configure test for POSIX threads, from the GNU
  autoconf macro repository.
- Fixed up some typos in the Rogue and Xatrix makefiles
2002-07-04 14:17:24 +00:00

113 lines
3.3 KiB
Makefile

# $Id$
SUBDIRS = . baseq2 ctf xatrix rogue
std_cflags = -Wall -Werror -pipe
module_ldflags = -module -avoid-version -rpath $(pkglibdir)
bin_PROGRAMS = quake2
pkglib_PROGRAMS = @VID_REFS@
EXTRA_PROGRAMS = ref_soft.la ref_softx.la ref_softsdl.la \
ref_glx.la ref_sdlgl.la ref_tdfx.la
# Common source files
REF_GL_COMMON = q_sh.c q_shared.c glob.c qgl.c \
gl_draw.c gl_image.c gl_light.c gl_mesh.c \
gl_model.c gl_rmain.c gl_rmisc.c gl_rsurf.c \
gl_warp.c
REF_SOFT_COMMON = r_aclip.c r_alias.c r_bsp.c r_draw.c r_edge.c \
r_image.c r_light.c r_main.c r_misc.c r_model.c \
r_part.c r_poly.c r_polyse.c r_rast.c r_scan.c \
r_sprite.c r_surf.c \
q_shared.c q_sh.c glob.c
if ASM_ARCH
REF_SOFT_ASM = r_aclipa.S r_draw16.S r_drawa.S r_edgea.S r_scana.S \
r_spr8.S r_surf8.S math.S d_polysa.S r_varsa.S \
sys_dosa.S
else
REF_SOFT_ASM =
endif
quake2_SOURCES = main.c q_sh.c vid_menu.c vid_so.c glob.c net_udp.c \
\
cl_cin.c cl_ents.c cl_fx.c cl_input.c cl_inv.c \
cl_main.c cl_parse.c cl_pred.c cl_tent.c cl_scrn.c \
cl_view.c cl_newfx.c console.c keys.c menu.c qmenu.c \
\
snd_dma.c snd_mix.c snd_mem.c \
\
checksum.c cmd.c cmodel.c common.c crc.c cvar.c \
files.c mdfour.c net_chan.c \
\
sv_ccmds.c sv_ents.c sv_game.c sv_init.c sv_main.c \
sv_send.c sv_user.c sv_world.c \
\
cd.c snd.c \
\
q_shared.c pmove.c \
\
m_flash.c
# \
# #snd_mixa.S
quake2_CFLAGS = $(std_cflags) @INCLTDL@ @PTHREAD_CFLAGS@
# the macro puts -pthread into cflags, but we want to link
# with this flag too, so stick it into the ldflags if it's there...
# extra cflags at link time can't hurt
quake2_LDFLAGS = @PTHREAD_CFLAGS@
quake2_LDADD = @PTHREAD_LIBS@ @LIBLTDL@ @OSS_LIBS@ -lm
# ref_glx
if BUILD_GLX
ref_glx_la_SOURCES = $(REF_GL_COMMON) gl_glx.c
ref_glx_la_CFLAGS = $(std_cflags) -fPIC @X_CFLAGS@ @OPENGL_CFLAGS@
ref_glx_la_LDADD = @X_PRE_LIBS@ @X_LIBS@ @XTRA_LIBS@ @X_EXTRA_LIBS@ @OPENGL_LIBS@ @DL_LIBS@
ref_glx_la_LDFLAGS = $(module_ldflags)
endif
# ref_tdfx
if BUILD_TDFX
ref_tdfx_la_SOURCES = $(REF_GL_COMMON) rw_in_svgalib.c gl_fxmesa.c
ref_tdfx_la_CFLAGS = $(std_cflags) -fPIC @GLIDE_CFLAGS@ @X_CFLAGS@ @SVGALIB_CFLAGS@
ref_tdfx_la_LDADD = @GLIDE_LIBS@ @X_LIBS@ @SVGALIB_LIBS@
ref_tdfx_la_LDFLAGS = $(module_ldflags)
endif
# ref_sdlgl
if BUILD_SDLGL
ref_sdlgl_la_SOURCES = $(REF_GL_COMMON) rw_sdl.c
ref_sdlgl_la_CFLAGS = $(std_cflags) -fPIC -DOPENGL @SDL_CFLAGS@ @OPENGL_CFLAGS@
ref_sdlgl_la_LDADD = @SDL_LIBS@ @OPENGL_LIBS@
ref_sdlgl_la_LDFLAGS = $(module_ldflags)
endif
# ref_soft
if BUILD_SOFT
if ASM_ARCH
DCOPY_S = d_copy.S
else
DCOPY_S =
endif
ref_soft_la_SOURCES = $(REF_SOFT_COMMON) $(REF_SOFT_ASM) $(DCOPY_S) \
rw_svgalib.c rw_in_svgalib.c
ref_soft_la_CFLAGS = $(std_cflags) -fPIC @SVGALIB_CFLAGS@
ref_soft_la_LDADD = @SVGALIB_LIBS@
ref_soft_la_LDFLAGS = $(module_ldflags)
endif
# ref_softx
if BUILD_SOFTX
ref_softx_la_SOURCES = $(REF_SOFT_COMMON) $(REF_SOFT_ASM) rw_x11.c
ref_softx_la_CFLAGS = $(std_cflags) -fPIC @X_CFLAGS@
ref_softx_la_LDADD = @X_PRE_LIBS@ @X_LIBS@ @XTRA_LIBS@ @X_EXTRA_LIBS@
ref_softx_la_LDFLAGS = $(module_ldflags)
endif
# ref_softsdl
if BUILD_SOFTSDL
ref_softsdl_la_SOURCES = $(REF_SOFT_COMMON) $(REF_SOFT_ASM) rw_sdl.c
ref_softsdl_la_CFLAGS = $(std_cflags) -fPIC @SDL_CFLAGS@
ref_softsdl_la_LDADD = @SDL_LIBS@
ref_softsdl_la_LDFLAGS = $(module_ldflags)
endif