don't process .S files when not using asm (either --disable-asmopt or non-x86

platforms). Done by moving the asm objects into libasm.la (yes, there's one in
each dir that needs it) so that the Makefiles don't explode.
This commit is contained in:
Bill Currie 2001-06-14 19:52:38 +00:00
parent 29188c9f33
commit 8c13809e9c
7 changed files with 91 additions and 28 deletions

View file

@ -735,6 +735,7 @@ case "${host}" in
;;
*) AC_MSG_RESULT(no)
esac
AM_CONDITIONAL(ASM_ARCH, test "$ASM_ARCH" = "yes")
dnl ==================================================================
dnl Checks for sound

View file

@ -5,44 +5,62 @@ libdir = @PLUGINDIR@
lib_LTLIBRARIES = @SND_PLUGIN_TARGETS@
EXTRA_LTLIBRARIES = libsound_sdl.la libsound_alsa0_5.la libsound_alsa0_9.la libsound_oss.la libsound_sgi.la libsound_sun.la libsound_win.la libsound_null.la libsound_disk.la
common_sound_files= snd_dma.c snd_mem.c snd_mix.c snd_mixa.S
if ASM_ARCH
ASM = libasm.la
else
ASM =
endif
noinst_LTLIBRARIES = $(ASM)
libasm_la_SOURCES = snd_mixa.S
common_sound_files= snd_dma.c snd_mem.c snd_mix.c
libsound_sdl_la_LDFLAGS= -version-info 1:0:0 $(SDL_LIBS)
libsound_sdl_la_LIBADD = $(ASM)
libsound_sdl_la_SOURCES= $(common_sound_files) snd_sdl.c
libsound_sdl.la: $(libsound_sdl_la_OBJECTS) $(libsound_sdl_la_DEPENDENCIES)
$(LINK) -rpath $(pluginpath) $(libsound_sdl_la_LDFLAGS) $(libsound_sdl_la_OBJECTS) $(libsound_sdl_la_LIBADD) $(LIBS)
libsound_alsa0_5_la_LDFLAGS= -version-info 1:0:0 $(ALSA_LIBS)
libsound_alsa0_5_la_LIBADD = $(ASM)
libsound_alsa0_5_la_SOURCES= $(common_sound_files) snd_alsa_0_5.c
libsound_alsa0_5.la: $(libsound_alsa0_5_la_OBJECTS) $(libsound_alsa0_5_la_DEPENDENCIES)
$(LINK) -rpath $(pluginpath) $(libsound_alsa0_5_la_LDFLAGS) $(libsound_alsa0_5_la_OBJECTS) $(libsound_alsa0_5_la_LIBADD) $(LIBS)
libsound_alsa0_9_la_LDFLAGS= -version-info 1:0:0 $(ALSA_LIBS)
libsound_alsa0_9_la_LIBADD = $(ASM)
libsound_alsa0_9_la_SOURCES= $(common_sound_files) snd_alsa_0_9.c
libsound_alsa0_9.la: $(libsound_alsa0_9_la_OBJECTS) $(libsound_alsa0_9_la_DEPENDENCIES)
$(LINK) -rpath $(pluginpath) $(libsound_alsa0_9_la_LDFLAGS) $(libsound_alsa0_9_la_OBJECTS) $(libsound_alsa0_9_la_LIBADD) $(LIBS)
libsound_oss_la_LDFLAGS= -version-info 1:0:0 $(OSS_LIBS) $(OSS_LIBS)
libsound_oss_la_LIBADD = $(ASM)
libsound_oss_la_SOURCES= $(common_sound_files) snd_oss.c
libsound_oss.la: $(libsound_oss_la_OBJECTS) $(libsound_oss_la_DEPENDENCIES)
$(LINK) -rpath $(pluginpath) $(libsound_oss_la_LDFLAGS) $(libsound_oss_la_OBJECTS) $(libsound_oss_la_LIBADD) $(LIBS)
libsound_sgi_la_LDFLAGS= -version-info 1:0:0 $(SGISND_LIBS)
libsound_sgi_la_LIBADD = $(ASM)
libsound_sgi_la_SOURCES= $(common_sound_files) snd_sgi.c
libsound_sgi.la: $(libsound_sgi_la_OBJECTS) $(libsound_sgi_la_DEPENDENCIES)
$(LINK) -rpath $(pluginpath) $(libsound_sgi_la_LDFLAGS) $(libsound_sgi_la_OBJECTS) $(libsound_sgi_la_LIBADD) $(LIBS)
libsound_sun_la_LDFLAGS= -version-info 1:0:0 $(SUN_LIBS)
libsound_sun_la_LIBADD = $(ASM)
libsound_sun_la_SOURCES= $(common_sound_files) snd_sun.c
libsound_sun.la: $(libsound_sun_la_OBJECTS) $(libsound_sun_la_DEPENDENCIES)
$(LINK) -rpath $(pluginpath) $(libsound_sun_la_LDFLAGS) $(libsound_sun_la_OBJECTS) $(libsound_sun_la_LIBADD) $(LIBS)
libsound_win_la_LDFLAGS= -version-info 1:0:0 $(WIN_LIBS)
libsound_win_la_LIBADD = $(ASM)
libsound_win_la_SOURCES= $(common_sound_files) snd_win.c
libsound_win.la: $(libsound_win_la_OBJECTS) $(libsound_win_la_DEPENDENCIES)
$(LINK) -rpath $(pluginpath) $(libsound_win_la_LDFLAGS) $(libsound_win_la_OBJECTS) $(libsound_win_la_LIBADD) $(LIBS)
libsound_disk_la_LDFLAGS= -version-info 1:0:0
libsound_disk_la_LIBADD = $(ASM)
libsound_disk_la_SOURCES= $(common_sound_files) snd_disk.c
libsound_disk.la: $(libsound_disk_la_OBJECTS) $(libsound_disk_la_DEPENDENCIES)
$(LINK) -rpath $(pluginpath) $(libsound_disk_la_LDFLAGS) $(libsound_disk_la_OBJECTS) $(libsound_disk_la_LIBADD) $(LIBS)

View file

@ -8,10 +8,21 @@ else
fnmatch_SRC =
endif
if ASM_ARCH
ASM = libasm.la
else
ASM =
endif
noinst_LTLIBRARIES = $(ASM)
libasm_la_SOURCES = math.S
libQFutil_la_LDFLAGS = -version-info 1:0:0 $(Z_LIBS) $(DL_LIBS)
libQFutil_la_LIBADD = $(ASM)
libQFutil_la_SOURCES = \
checksum.c cmd.c console.c con_print.c crc.c cvar.c hash.c \
info.c link.c math.S \
info.c link.c \
mathlib.c \
mdfour.c msg.c pcx.c plugin.c qargs.c qendian.c qfplist.c quakefs.c \
quakeio.c sizebuf.c sys.c sys_error.c tga.c va.c ver_check.c wad.c \

View file

@ -5,17 +5,25 @@ SW = libsw.la
else
SW =
endif
if ASM_ARCH
ASM = libasm.la
else
ASM =
endif
noinst_LTLIBRARIES = $(SW)
noinst_LTLIBRARIES = $(SW) $(ASM)
libasm_la_SOURCES = \
d_draw.S d_draw16.S d_parta.S d_polysa.S d_scana.S d_spr8.S \
d_varsa.S surf16.S surf8.S sw_raclipa.S sw_raliasa.S sw_rdrawa.S \
sw_redgea.S sw_rvarsa.S \
transform.S
libsw_la_LDFLAGS = -version-info 1:0:0
libsw_la_LIBADD = $(ASM)
libsw_la_SOURCES = d_edge.c d_fill.c d_init.c d_modech.c d_part.c d_polyse.c \
d_scan.c d_sky.c d_sprite.c d_surf.c d_vars.c d_zpoint.c draw.c \
nonintel.c screen.c \
sw_graph.c sw_raclip.c sw_ralias.c sw_rbsp.c sw_rdraw.c sw_redge.c \
sw_rlight.c sw_rmain.c sw_rmisc.c sw_rpart.c sw_rsky.c sw_rsprite.c \
sw_rsurf.c sw_skin.c \
d_draw.S d_draw16.S d_parta.S d_polysa.S d_scana.S d_spr8.S \
d_varsa.S surf16.S surf8.S sw_raclipa.S sw_raliasa.S sw_rdrawa.S \
sw_redgea.S sw_rvarsa.S \
transform.S
sw_rsurf.c sw_skin.c

View file

@ -3,6 +3,16 @@ INCLUDES= -I$(top_srcdir)/include $(GGI_CFLAGS) $(MGL_CFLAGS) $(SDL_CFLAGS) $(SV
lib_LTLIBRARIES = @VID_TARGETS@
EXTRA_LTLIBRARIES = libQFjs.la libQFfbdev.la libQFsvga.la libQFx11.la libQFglx.la libQFsdl.la libQFsgl.la libQFtdfx.la libQFwgl.la libQFmgl.la
if ASM_ARCH
ASM = libasm.la
else
ASM =
endif
noinst_LTLIBRARIES = $(ASM)
libasm_la_SOURCES = d_copy.S
libQFjs_la_LDFLAGS= -version-info 1:0:0
if JOYTYPE_LINUX
@ -60,7 +70,8 @@ libQFsgl.la: $(libQFsgl_la_OBJECTS) $(libQFsgl_la_DEPENDENCIES)
libQFsvga_la_LDFLAGS= -version-info 1:0:0
libQFsvga_la_SOURCES= d_copy.S in_common.c in_svgalib.c vid.c vid_common_sw.c \
libQFsvga_la_LIBADD=$(ASM)
libQFsvga_la_SOURCES= in_common.c in_svgalib.c vid.c vid_common_sw.c \
vid_svgalib.c
libQFsvga.la: $(libQFsvga_la_OBJECTS) $(libQFsvga_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libQFsvga_la_LDFLAGS) $(libQFsvga_la_OBJECTS) $(libQFsvga_la_LIBADD) $(LIBS)

View file

@ -38,11 +38,17 @@ bin_PROGRAMS = @NQ_TARGETS@
EXTRA_PROGRAMS= nq-3dfx nq-fbdev nq-glx nq-mgl nq-sdl \
nq-sgl nq-svga nq-wgl nq-x11 nq-server
noinst_LIBRARIES= libqfnet.a
if ASM_ARCH
ASM = libasm.la
else
ASM =
endif
common_ASM= sys_ia32.S worlda.S
noinst_LTLIBRARIES= libqfnet.la $(ASM)
common_SOURCES= game.c host_skin.c skin.c world.c com.c $(common_ASM)
libasm_la_SOURCES = sys_ia32.S worlda.S
common_SOURCES= game.c host_skin.c skin.c world.c com.c
common_ldflags= -export-dynamic
@ -54,10 +60,10 @@ qfsys_SRC= sys_unix.c
endif
# ... Networking
libqfnet_a_SOURCES= net_bsd.c net_dgrm.c net_loop.c \
libqfnet_la_SOURCES= net_bsd.c net_dgrm.c net_loop.c \
net_main.c net_udp.c net_vcr.c
EXTRA_libqfnet_a_SOURCES= net_dos.c net_bw.c net_ipx.c net_mp.c net_ser.c \
EXTRA_libqfnet_la_SOURCES= net_dos.c net_bw.c net_ipx.c net_mp.c net_ser.c \
net_win.c net_wins.c net_wipx.c
qf_client_LIBS= $(top_builddir)/libs/video/targets/libQFjs.la \
@ -67,8 +73,8 @@ qf_client_LIBS= $(top_builddir)/libs/video/targets/libQFjs.la \
$(top_builddir)/libs/audio/libQFsound.la \
$(top_builddir)/libs/util/libQFutil.la
client_LIBS= -L. -lqfnet $(qf_client_LIBS) $(NET_LIBS)
client_LIB_DEPS= libqfnet.a $(qf_client_LIBS)
client_LIBS= -L. -lqfnet $(ASM) $(qf_client_LIBS) $(NET_LIBS)
client_LIB_DEPS= libqfnet.a $(ASM) $(qf_client_LIBS)
client_SOURCES= cl_cam.c cl_cmd.c cl_demo.c cl_input.c cl_main.c cl_screen.c \
cl_parse.c cl_tent.c \
@ -153,8 +159,8 @@ nq_wgl_DEPENDENCIES=../../libs/video/renderer/libQFrenderer_gl.la ../../libs/mod
ded_SOURCES= sys_unixd.c sv_ded.c
nq_server_SOURCES= $(common_SOURCES) $(server_SOURCES) $(ded_SOURCES)
nq_server_LDADD= libqfnet.a
nq_server_DEPENDENCIES= libqfnet.a
nq_server_LDADD= libqfnet.a $(ASM)
nq_server_DEPENDENCIES= libqfnet.a $(ASM)
# Stuff that doesn't get linked into an executable NEEDS to be mentioned here,
# or it won't be distributed with 'make dist'

View file

@ -39,22 +39,30 @@ EXTRA_PROGRAMS= qw-client-3dfx qw-client-fbdev \
qw-client-sgl qw-client-svga qw-client-wgl \
qw-client-x11 qw-server
noinst_LIBRARIES= libqfnet.a
if ASM_ARCH
ASM = libasm.la
else
ASM =
endif
noinst_LTLIBRARIES= libqfnet.la $(ASM)
libasm_la_SOURCES = sys_x86.S worlda.S
common_SOURCES= buildnum.c com.c \
game.c msg_ucmd.c \
pmove.c pmovetst.c \
sys_x86.S net_packetlog.c
net_packetlog.c
common_ldflags= -export-dynamic
# ... Network type
if NETTYPE_IPV6
libqfnet_a_SOURCES= net_chan.c net_udp6.c
libqfnet_la_SOURCES= net_chan.c net_udp6.c
else
libqfnet_a_SOURCES= net_chan.c net_udp.c
libqfnet_la_SOURCES= net_chan.c net_udp.c
endif
EXTRA_libqfnet_a_SOURCES= net_chan.c net_udp.c net_udp6.c
EXTRA_libqfnet_la_SOURCES= net_chan.c net_udp.c net_udp6.c
# Server builds
#
@ -67,15 +75,15 @@ endif
server_SOURCES= sv_ccmds.c sv_cvar.c sv_ents.c sv_init.c sv_main.c sv_misc.c \
sv_model.c sv_move.c sv_nchan.c sv_phys.c sv_pr_cmds.c \
sv_progs.c sv_send.c sv_user.c world.c worlda.S $(syssv_SRC)
sv_progs.c sv_send.c sv_user.c world.c $(syssv_SRC)
qf_server_LIBS= $(top_builddir)/libs/models/libQFmodels.la \
$(top_builddir)/libs/gamecode/libQFgamecode.la \
$(top_builddir)/libs/util/libQFutil.la
qw_server_SOURCES= $(common_SOURCES) $(server_SOURCES)
qw_server_LDADD= -L. -lqfnet $(qf_server_LIBS) $(NET_LIBS) $(DL_LIBS)
qw_server_DEPENDENCIES= libqfnet.a $(qf_server_LIBS)
qw_server_LDADD= -L. -lqfnet $(ASM) $(qf_server_LIBS) $(NET_LIBS) $(DL_LIBS)
qw_server_DEPENDENCIES= libqfnet.a $(ASM) $(qf_server_LIBS)
# Client builds
#
@ -92,8 +100,8 @@ qf_client_LIBS= $(top_builddir)/libs/video/targets/libQFjs.la \
$(top_builddir)/libs/audio/libQFsound.la \
$(top_builddir)/libs/util/libQFutil.la
client_LIBS= -L. -lqfnet $(qf_client_LIBS) $(NET_LIBS)
client_LIB_DEPS= libqfnet.a $(qf_client_LIBS)
client_LIBS= -L. -lqfnet $(ASM) $(qf_client_LIBS) $(NET_LIBS)
client_LIB_DEPS= libqfnet.a $(ASM) $(qf_client_LIBS)
# libQFjs is seperate because it needs to be linked after when building statically
client_SOURCES= cl_cam.c cl_cmd.c cl_cvar.c cl_demo.c cl_ents.c cl_input.c \