Search
lxdream.org :: lxdream/src/Makefile.am
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)
view annotate diff log raw
     1 ## Process this file with automake to produce Makefile.in
     2 SVNVERSION=@SVNVERSION@
     3 INCLUDES = \
     4 	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
     5 	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
     6 	-DPACKAGE_PLUGIN_DIR=\""$(pkglibdir)"\" \
     7 	-DPACKAGE_CONF_DIR=\""$(sysconfdir)"\" \
     8         -Ish4 \
     9 	@GLIB_CFLAGS@ @GTK_CFLAGS@ @LIBPNG_CFLAGS@ @PULSE_CFLAGS@ @ESOUND_CFLAGS@ @ALSA_CFLAGS@ @SDL_CFLAGS@
    11 SOEXT=@SOEXT@
    12 PLUGINCFLAGS = @PLUGINCFLAGS@ 
    13 PLUGINLDFLAGS = @PLUGINLDFLAGS@
    14 bin_PROGRAMS = lxdream
    15 noinst_PROGRAMS = gendec genglsl
    16 check_PROGRAMS = test/testxlt
    18 pkglib_PROGRAMS=
    19 EXTRA_DIST=drivers/genkeymap.pl checkver.pl
    20 AM_CFLAGS = -D__EXTENSIONS__ -D_BSD_SOURCE -D_GNU_SOURCE
    22 .PHONY: checkversion
    23 checkversion:
    24 	@$(srcdir)/checkver.pl "$(VERSION)" "$(top_srcdir)" version.c
    26 version.c: checkversion
    28 TESTS = test/testxlt
    29 BUILT_SOURCES = sh4/sh4core.c sh4/sh4dasm.c sh4/sh4x86.c sh4/sh4stat.c \
    30 	pvr2/gl_slsrc.c drivers/mac_keymap.h version.c
    31 CLEANFILES = sh4/sh4core.c sh4/sh4dasm.c sh4/sh4x86.c sh4/sh4stat.c \
    32 	pvr2/gl_slsrc.c drivers/mac_keymap.h version.c  \
    33 	audio_alsa.lo audio_sdl.lo audio_esd.lo audio_pulse.lo input_lirc.lo
    35 #all-am: checkversion
    37 gendec_SOURCES = tools/gendec.c tools/gendec.h tools/insparse.c tools/actparse.c
    38 genglsl_SOURCES = tools/genglsl.c
    39 lxdream_LINK = $(LINK) @LXDREAMLDFLAGS@
    40 lxdream_LDADD = @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@ $(INTLLIBS)
    41 lxdream_SOURCES = \
    42         main.c version.c config.c config.h lxdream.h dream.h gui.h cpu.h hook.h \
    43         gettext.h mem.c mem.h sdram.c mmio.h watch.c \
    44         asic.c asic.h clock.h serial.h \
    45         syscall.c syscall.h bios.c dcload.c gdbserver.c \
    46         netutil.c netutil.h \
    47         gdrom/ide.c gdrom/ide.h gdrom/packet.h gdrom/gdimage.c \
    48 	gdrom/gdrom.c gdrom/gdrom.h gdrom/nrg.c gdrom/cdi.c gdrom/gdi.c \
    49 	gdrom/edc_ecc.c gdrom/ecc.h gdrom/edc_crctable.h gdrom/edc_encoder.h \
    50 	gdrom/edc_l2sq.h gdrom/edc_scramble.h gdrom/gddriver.h \
    51         dreamcast.c dreamcast.h eventq.c eventq.h \
    52         sh4/sh4.c sh4/intc.c sh4/intc.h sh4/sh4mem.c sh4/timer.c sh4/dmac.c \
    53         sh4/mmu.c sh4/sh4core.c sh4/sh4core.h sh4/sh4dasm.c sh4/sh4dasm.h \
    54         sh4/sh4mmio.c sh4/sh4mmio.h sh4/scif.c sh4/sh4stat.c sh4/sh4stat.h \
    55 	xlat/xltcache.c xlat/xltcache.h sh4/sh4.h sh4/dmac.h sh4/pmm.c \
    56 	sh4/cache.c sh4/mmu.h \
    57         aica/armcore.c aica/armcore.h aica/armdasm.c aica/armdasm.h aica/armmem.c \
    58         aica/aica.c aica/aica.h aica/audio.c aica/audio.h \
    59 	pvr2/pvr2.c pvr2/pvr2.h pvr2/pvr2mem.c pvr2/pvr2mmio.h \
    60 	pvr2/tacore.c pvr2/rendsort.c \
    61 	pvr2/texcache.c pvr2/yuv.c pvr2/rendsave.c pvr2/scene.c pvr2/scene.h \
    62 	pvr2/gl_sl.c pvr2/gl_slsrc.c pvr2/glutil.c pvr2/glutil.h pvr2/glrender.c \
    63 	pvr2/vertex.glsl pvr2/fragment.glsl \
    64         maple/maple.c maple/maple.h \
    65         maple/controller.c maple/kbd.c maple/mouse.c maple/lightgun.c \
    66         loader.c loader.h elf.h bootstrap.c bootstrap.h util.c gdlist.c gdlist.h \
    67 	display.c display.h dckeysyms.h \
    68 	drivers/audio_null.c drivers/video_null.c drivers/cd_mmc.c \
    69 	drivers/video_gl.c drivers/video_gl.h drivers/gl_fbo.c \
    70 	sh4/sh4.def sh4/sh4core.in sh4/sh4x86.in sh4/sh4dasm.in sh4/sh4stat.in \
    71 	hotkeys.c hotkeys.h
    72 lxdream_CPPFLAGS = @LXDREAMCPPFLAGS@
    73 if BUILD_SHARED
    74 lxdream_SOURCES += plugin.c plugin.h
    75 endif	
    77 if BUILD_SH4X86
    78 lxdream_SOURCES += sh4/sh4x86.c xlat/x86/x86op.h \
    79         xlat/x86/ia32abi.h xlat/x86/amd64abi.h \
    80         sh4/sh4trans.c sh4/sh4trans.h sh4/mmux86.c \
    81         x86dasm/x86dasm.c x86dasm/x86dasm.h \
    82         x86dasm/i386-dis.c x86dasm/dis-init.c x86dasm/dis-buf.c \
    83         x86dasm/ansidecl.h x86dasm/bfd.h x86dasm/dis-asm.h \
    84         x86dasm/symcat.h x86dasm/sysdep.h
    86 test_testsh4x86_LDADD = @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@
    87 test_testsh4x86_CPPFLAGS = @LXDREAMCPPFLAGS@
    88 test_testsh4x86_SOURCES = test/testsh4x86.c x86dasm/x86dasm.c \
    89 	x86dasm/x86dasm.h x86dasm/i386-dis.c x86dasm/dis-init.c \
    90 	x86dasm/dis-buf.c \
    91 	sh4/sh4trans.c sh4/sh4x86.c xlat/xltcache.c \
    92 	xlat/xltcache.h mem.c util.c 
    94 check_PROGRAMS += test/testsh4x86
    95 endif
    97 if GUI_GTK
    98 lxdream_SOURCES += gtkui/gtkui.c gtkui/gtkui.h \
    99 	gtkui/gtk_win.c gtkui/gtkcb.c \
   100         gtkui/gtk_mmio.c gtkui/gtk_debug.c gtkui/gtk_dump.c \
   101         gtkui/gtk_ctrl.c gtkui/gtk_path.c gtkui/gtk_gd.c \
   102         gtkui/gtk_hotkeys.c drivers/net_glib.c drivers/video_gtk.c
   103 endif
   105 if GUI_COCOA
   106 lxdream_SOURCES += cocoaui/cocoaui.m cocoaui/cocoaui.h \
   107 	cocoaui/cocoa_win.m cocoaui/cocoa_gd.m cocoaui/cocoa_prefs.m \
   108 	cocoaui/cocoa_path.m cocoaui/cocoa_ctrl.m cocoaui/paths_osx.m \
   109 	drivers/net_osx.m drivers/video_osx.m \
   110 	drivers/mac_keymap.h drivers/mac_keymap.txt
   111 else
   112 lxdream_SOURCES += paths_unix.c
   113 endif
   115 if VIDEO_OSMESA
   116 lxdream_SOURCES += drivers/video_gdk.c
   117 endif
   119 if VIDEO_GLX 
   120 lxdream_SOURCES += drivers/video_glx.c drivers/video_glx.h
   121 endif
   123 if VIDEO_NSGL
   124 lxdream_SOURCES += drivers/video_nsgl.m drivers/video_nsgl.h
   125 endif
   127 if AUDIO_OSX
   128 lxdream_SOURCES += drivers/audio_osx.m
   129 endif
   131 if BUILD_SHARED
   132 if AUDIO_SDL
   133 pkglib_PROGRAMS += audio_sdl.@SOEXT@
   134 audio_sdl_@SOEXT@_SOURCES =
   135 audio_sdl_@SOEXT@_LDADD = audio_sdl.lo @SDL_LIBS@
   136 audio_sdl_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   137 audio_sdl.lo: drivers/audio_sdl.c
   138 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   139 endif
   141 if AUDIO_PULSE
   142 pkglib_PROGRAMS += audio_pulse.@SOEXT@
   143 audio_pulse_@SOEXT@_SOURCES =
   144 audio_pulse_@SOEXT@_LDADD = audio_pulse.lo @PULSE_LIBS@
   145 audio_pulse_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   146 audio_pulse.lo: drivers/audio_pulse.c
   147 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   148 endif
   150 if AUDIO_ESOUND
   151 pkglib_PROGRAMS += audio_esd.@SOEXT@
   152 audio_esd_@SOEXT@_SOURCES =
   153 audio_esd_@SOEXT@_LDADD = audio_esd.lo @ESOUND_LIBS@
   154 audio_esd_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   155 audio_esd.lo: drivers/audio_esd.c
   156 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   157 endif
   159 if AUDIO_ALSA
   160 pkglib_PROGRAMS += audio_alsa.@SOEXT@
   161 audio_alsa_@SOEXT@_SOURCES =
   162 audio_alsa_@SOEXT@_LDADD = audio_alsa.lo @ALSA_LIBS@
   163 audio_alsa_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   164 audio_alsa.lo: drivers/audio_alsa.c
   165 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   166 endif
   168 if INPUT_LIRC
   169 pkglib_PROGRAMS += input_lirc.@SOEXT@
   170 input_lirc_@SOEXT@_SOURCES =
   171 input_lirc_@SOEXT@_LDADD = input_lirc.lo	 -llirc_client
   172 input_lirc_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   173 input_lirc.lo: drivers/input_lirc.c
   174 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   175 endif
   177 else # build statically
   178 if AUDIO_SDL
   179 lxdream_SOURCES += drivers/audio_sdl.c
   180 lxdream_LDADD += @SDL_LIBS@
   181 endif
   183 if AUDIO_PULSE
   184 lxdream_SOURCES += drivers/audio_pulse.c
   185 lxdream_LDADD += @PULSE_LIBS@
   186 endif
   188 if AUDIO_ESOUND
   189 lxdream_SOURCES += drivers/audio_esd.c
   190 lxdream_LDADD += @ESOUND_LIBS@
   191 endif
   193 if AUDIO_ALSA
   194 lxdream_SOURCES += drivers/audio_alsa.c
   195 lxdream_LDADD += @ALSA_LIBS@
   196 endif
   198 if INPUT_LIRC
   199 lxdream_SOURCES += drivers/input_lirc.c
   200 lxdream_LDADD += -llirc_client
   201 endif
   202 endif # end shared/static control
   204 if CDROM_LINUX
   205 lxdream_SOURCES += drivers/cd_linux.c
   206 endif
   208 if CDROM_OSX
   209 lxdream_SOURCES += drivers/cd_osx.c drivers/osx_iokit.m drivers/osx_iokit.h
   210 endif
   212 if CDROM_NONE
   213 lxdream_SOURCES += drivers/cd_none.c
   214 endif
   216 if JOY_LINUX
   217 lxdream_SOURCES += drivers/joy_linux.c drivers/joy_linux.h
   218 endif
   222 gendec_LDADD = @GLIB_LIBS@ @GTK_LIBS@ $(INTLLIBS)
   223 genglsl_LDADD = @GLIB_LIBS@ @GTK_LIBS@ $(INTLLIBS)
   226 test_testxlt_SOURCES = test/testxlt.c xlat/xltcache.c xlat/xltcache.h
   228 sh4/sh4core.c: gendec sh4/sh4.def sh4/sh4core.in
   229 	mkdir -p `dirname $@`
   230 	./gendec $(srcdir)/sh4/sh4.def $(srcdir)/sh4/sh4core.in -o $@
   231 sh4/sh4dasm.c: gendec sh4/sh4.def sh4/sh4dasm.in
   232 	mkdir -p `dirname $@`
   233 	./gendec $(srcdir)/sh4/sh4.def $(srcdir)/sh4/sh4dasm.in -o $@
   234 sh4/sh4x86.c: gendec sh4/sh4.def sh4/sh4x86.in
   235 	mkdir -p `dirname $@`
   236 	./gendec $(srcdir)/sh4/sh4.def $(srcdir)/sh4/sh4x86.in -o $@
   237 sh4/sh4stat.c: gendec sh4/sh4.def sh4/sh4stat.in
   238 	mkdir -p `dirname $@`
   239 	./gendec $(srcdir)/sh4/sh4.def $(srcdir)/sh4/sh4stat.in -o $@
   240 pvr2/gl_slsrc.c: genglsl pvr2/vertex.glsl pvr2/fragment.glsl
   241 	mkdir -p `dirname $@`
   242 	./genglsl $(srcdir)/pvr2/vertex.glsl $(srcdir)/pvr2/fragment.glsl $@
   243 drivers/mac_keymap.h: drivers/mac_keymap.txt drivers/genkeymap.pl
   244 	$(srcdir)/drivers/genkeymap.pl mac $(srcdir)/drivers/mac_keymap.txt > $@
.