Search
lxdream.org :: lxdream/src/Makefile.am :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/Makefile.am
changeset 1024:c67f2d61ab97
prev1023:264e2fd90be8
next1027:4e527bc96109
author nkeynes
date Sat Jun 13 00:50:48 2009 +0000 (11 years ago)
permissions -rw-r--r--
last change Build drivers with library dependencies as shared objects (ie plugins)
file annotate diff log raw
1.1 --- a/src/Makefile.am Mon Jun 08 04:12:21 2009 +0000
1.2 +++ b/src/Makefile.am Sat Jun 13 00:50:48 2009 +0000
1.3 @@ -8,11 +8,14 @@
1.4 -Ish4 \
1.5 @GLIB_CFLAGS@ @GTK_CFLAGS@ @LIBPNG_CFLAGS@ @PULSE_CFLAGS@ @ESOUND_CFLAGS@ @ALSA_CFLAGS@ @SDL_CFLAGS@
1.6
1.7 +SOEXT=@SOEXT@
1.8 +PLUGINCFLAGS = @PLUGINCFLAGS@
1.9 +PLUGINLDFLAGS = @PLUGINLDFLAGS@
1.10 bin_PROGRAMS = lxdream
1.11 noinst_PROGRAMS = gendec genglsl
1.12 check_PROGRAMS = test/testxlt
1.13
1.14 -
1.15 +pkglib_PROGRAMS=
1.16 EXTRA_DIST=drivers/genkeymap.pl checkver.pl
1.17 AM_CFLAGS = -D__EXTENSIONS__ -D_BSD_SOURCE -D_GNU_SOURCE
1.18
1.19 @@ -26,13 +29,15 @@
1.20 BUILT_SOURCES = sh4/sh4core.c sh4/sh4dasm.c sh4/sh4x86.c sh4/sh4stat.c \
1.21 pvr2/gl_slsrc.c drivers/mac_keymap.h version.c
1.22 CLEANFILES = sh4/sh4core.c sh4/sh4dasm.c sh4/sh4x86.c sh4/sh4stat.c \
1.23 - pvr2/gl_slsrc.c drivers/mac_keymap.h version.c
1.24 + pvr2/gl_slsrc.c drivers/mac_keymap.h version.c \
1.25 + audio_alsa.lo audio_sdl.lo audio_esd.lo audio_pulse.lo input_lirc.lo
1.26
1.27 #all-am: checkversion
1.28
1.29 gendec_SOURCES = tools/gendec.c tools/gendec.h tools/insparse.c tools/actparse.c
1.30 genglsl_SOURCES = tools/genglsl.c
1.31 -lxdream_LINK = $(LINK)
1.32 +lxdream_LINK = $(LINK) @LXDREAMLDFLAGS@
1.33 +lxdream_LDADD = @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@ $(INTLLIBS)
1.34 lxdream_SOURCES = \
1.35 main.c version.c config.c config.h lxdream.h dream.h gui.h cpu.h hook.h \
1.36 gettext.h mem.c mem.h sdram.c mmio.h watch.c \
1.37 @@ -64,7 +69,10 @@
1.38 drivers/video_gl.c drivers/video_gl.h drivers/gl_fbo.c \
1.39 sh4/sh4.def sh4/sh4core.in sh4/sh4x86.in sh4/sh4dasm.in sh4/sh4stat.in \
1.40 hotkeys.c hotkeys.h
1.41 -
1.42 +lxdream_CPPFLAGS = @LXDREAMCPPFLAGS@
1.43 +if BUILD_SHARED
1.44 +lxdream_SOURCES += plugin.c plugin.h
1.45 +endif
1.46
1.47 if BUILD_SH4X86
1.48 lxdream_SOURCES += sh4/sh4x86.c xlat/x86/x86op.h \
1.49 @@ -76,6 +84,7 @@
1.50 x86dasm/symcat.h x86dasm/sysdep.h
1.51
1.52 test_testsh4x86_LDADD = @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@
1.53 +test_testsh4x86_CPPFLAGS = @LXDREAMCPPFLAGS@
1.54 test_testsh4x86_SOURCES = test/testsh4x86.c x86dasm/x86dasm.c \
1.55 x86dasm/x86dasm.h x86dasm/i386-dis.c x86dasm/dis-init.c \
1.56 x86dasm/dis-buf.c \
1.57 @@ -119,22 +128,78 @@
1.58 lxdream_SOURCES += drivers/audio_osx.m
1.59 endif
1.60
1.61 +if BUILD_SHARED
1.62 +if AUDIO_SDL
1.63 +pkglib_PROGRAMS += audio_sdl.@SOEXT@
1.64 +audio_sdl_@SOEXT@_SOURCES =
1.65 +audio_sdl_@SOEXT@_LDADD = audio_sdl.lo @SDL_LIBS@
1.66 +audio_sdl_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
1.67 +audio_sdl.lo: drivers/audio_sdl.c
1.68 + $(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
1.69 +endif
1.70 +
1.71 +if AUDIO_PULSE
1.72 +pkglib_PROGRAMS += audio_pulse.@SOEXT@
1.73 +audio_pulse_@SOEXT@_SOURCES =
1.74 +audio_pulse_@SOEXT@_LDADD = audio_pulse.lo @PULSE_LIBS@
1.75 +audio_pulse_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
1.76 +audio_pulse.lo: drivers/audio_pulse.c
1.77 + $(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
1.78 +endif
1.79 +
1.80 +if AUDIO_ESOUND
1.81 +pkglib_PROGRAMS += audio_esd.@SOEXT@
1.82 +audio_esd_@SOEXT@_SOURCES =
1.83 +audio_esd_@SOEXT@_LDADD = audio_esd.lo @ESOUND_LIBS@
1.84 +audio_esd_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
1.85 +audio_esd.lo: drivers/audio_esd.c
1.86 + $(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
1.87 +endif
1.88 +
1.89 +if AUDIO_ALSA
1.90 +pkglib_PROGRAMS += audio_alsa.@SOEXT@
1.91 +audio_alsa_@SOEXT@_SOURCES =
1.92 +audio_alsa_@SOEXT@_LDADD = audio_alsa.lo @ALSA_LIBS@
1.93 +audio_alsa_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
1.94 +audio_alsa.lo: drivers/audio_alsa.c
1.95 + $(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
1.96 +endif
1.97 +
1.98 +if INPUT_LIRC
1.99 +pkglib_PROGRAMS += input_lirc.@SOEXT@
1.100 +input_lirc_@SOEXT@_SOURCES =
1.101 +input_lirc_@SOEXT@_LDADD = input_lirc.lo -llirc_client
1.102 +input_lirc_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
1.103 +input_lirc.lo: drivers/input_lirc.c
1.104 + $(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
1.105 +endif
1.106 +
1.107 +else # build statically
1.108 if AUDIO_SDL
1.109 lxdream_SOURCES += drivers/audio_sdl.c
1.110 +lxdream_LDADD += @SDL_LIBS@
1.111 endif
1.112
1.113 if AUDIO_PULSE
1.114 lxdream_SOURCES += drivers/audio_pulse.c
1.115 +lxdream_LDADD += @PULSE_LIBS@
1.116 endif
1.117
1.118 if AUDIO_ESOUND
1.119 lxdream_SOURCES += drivers/audio_esd.c
1.120 +lxdream_LDADD += @ESOUND_LIBS@
1.121 endif
1.122
1.123 if AUDIO_ALSA
1.124 lxdream_SOURCES += drivers/audio_alsa.c
1.125 +lxdream_LDADD += @ALSA_LIBS@
1.126 endif
1.127
1.128 +if INPUT_LIRC
1.129 +lxdream_SOURCES += drivers/input_lirc.c
1.130 +lxdream_LDADD += -llirc_client
1.131 +endif
1.132 +endif # end shared/static control
1.133
1.134 if CDROM_LINUX
1.135 lxdream_SOURCES += drivers/cd_linux.c
1.136 @@ -152,12 +217,7 @@
1.137 lxdream_SOURCES += drivers/joy_linux.c drivers/joy_linux.h
1.138 endif
1.139
1.140 -if INPUT_LIRC
1.141 -lxdream_SOURCES += drivers/input_lirc.c drivers/input_lirc.h
1.142 -LIRC_LIBS = -llirc_client
1.143 -endif
1.144
1.145 -lxdream_LDADD = @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@ @PULSE_LIBS@ @ESOUND_LIBS@ @ALSA_LIBS@ @SDL_LIBS@ $(INTLLIBS) $(LIRC_LIBS)
1.146
1.147 gendec_LDADD = @GLIB_LIBS@ @GTK_LIBS@ $(INTLLIBS)
1.148 genglsl_LDADD = @GLIB_LIBS@ @GTK_LIBS@ $(INTLLIBS)
.