Search
lxdream.org :: lxdream/src/Makefile.am
lxdream 0.9.1
released Jun 29
Download Now
filename src/Makefile.am
changeset 1181:3dc028106b08
prev1162:a10d0d254f1f
next1183:425d9de21c78
author nkeynes
date Fri Nov 25 09:02:13 2011 +1000 (8 years ago)
permissions -rw-r--r--
last change Fix built-source dependencies to include $(EXEEXT), for the sake of win32
builds
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@ @LIBISOFS_CFLAGS@
    11 SOEXT=@SOEXT@
    12 PLUGINCFLAGS = @PLUGINCFLAGS@ 
    13 PLUGINLDFLAGS = @PLUGINLDFLAGS@
    14 bin_PROGRAMS = lxdream
    15 noinst_PROGRAMS = gendec genglsl genmach
    16 check_PROGRAMS = test/testxlt
    18 pkglib_PROGRAMS=
    19 EXTRA_DIST=drivers/genkeymap.pl checkver.pl drivers/dummy.c
    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/shaders.def pvr2/shaders.h drivers/mac_keymap.h version.c
    31 CLEANFILES = sh4/sh4core.c sh4/sh4dasm.c sh4/sh4x86.c sh4/sh4stat.c \
    32 	pvr2/shaders.def pvr2/shaders.h drivers/mac_keymap.h version.c  \
    33 	audio_alsa.lo audio_sdl.lo audio_esd.lo audio_pulse.lo input_lirc.lo \
    34 	lxdream_dummy.lo
    36 #all-am: checkversion
    38 gendec_SOURCES = tools/gendec.c tools/gendec.h tools/insparse.c tools/actparse.c
    39 genmach_SOURCES = tools/genmach.c tools/genmach.h tools/mdparse.c
    40 genglsl_SOURCES = tools/genglsl.c
    41 lxdream_LINK = $(LINK) @LXDREAMLDFLAGS@
    42 lxdream_LDADD = @LXDREAM_LIBS@ @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@ @LIBISOFS_LIBS@ $(INTLLIBS)
    43 lxdream_SOURCES = \
    44         main.c version.c config.c config.h lxdream.h dream.h gui.h cpu.c cpu.h hook.h \
    45         gettext.h mem.c mem.h sdram.c mmio.h watch.c \
    46         asic.c asic.h clock.h serial.h \
    47         syscall.c syscall.h bios.c dcload.c gdbserver.c \
    48         ioutil.c ioutil.h lxpaths.c lxpaths.h \
    49         gdrom/ide.c gdrom/ide.h gdrom/packet.h gdrom/gdrom.c gdrom/gdrom.h \
    50         dreamcast.c dreamcast.h eventq.c eventq.h \
    51         sh4/sh4.c sh4/intc.c sh4/intc.h sh4/sh4mem.c sh4/timer.c sh4/dmac.c \
    52         sh4/mmu.c sh4/sh4core.c sh4/sh4core.h sh4/sh4dasm.c sh4/sh4dasm.h \
    53         sh4/sh4mmio.c sh4/sh4mmio.h sh4/scif.c sh4/sh4stat.c sh4/sh4stat.h \
    54 	xlat/xltcache.c xlat/xltcache.h sh4/sh4.h sh4/dmac.h sh4/pmm.c \
    55 	sh4/cache.c sh4/mmu.h sh4/shadow.c \
    56         aica/armcore.c aica/armcore.h aica/armdasm.c aica/armdasm.h aica/armmem.c \
    57         aica/aica.c aica/aica.h aica/audio.c aica/audio.h \
    58 	pvr2/pvr2.c pvr2/pvr2.h pvr2/pvr2mem.c pvr2/pvr2mmio.h \
    59 	pvr2/tacore.c pvr2/rendsort.c pvr2/tileiter.h pvr2/shaders.glsl \
    60 	pvr2/texcache.c pvr2/yuv.c pvr2/rendsave.c pvr2/scene.c pvr2/scene.h \
    61 	pvr2/gl_sl.c pvr2/shaders.h pvr2/shaders.def pvr2/glutil.c pvr2/glutil.h pvr2/glrender.c \
    62         maple/maple.c maple/maple.h \
    63         maple/controller.c maple/kbd.c maple/mouse.c maple/lightgun.c maple/vmu.c \
    64         loader.c loader.h elf.h bootstrap.c bootstrap.h util.c gdlist.c gdlist.h \
    65         vmu/vmuvol.c vmu/vmuvol.h vmu/vmulist.c vmu/vmulist.h \
    66 	display.c display.h dckeysyms.h \
    67 	drivers/audio_null.c drivers/video_null.c \
    68 	drivers/video_gl.c drivers/video_gl.h drivers/gl_fbo.c drivers/gl_vbo.c \
    69 	drivers/serial_unix.c \
    70 	drivers/cdrom/cdrom.h drivers/cdrom/cdrom.c drivers/cdrom/drive.h \
    71 	drivers/cdrom/sector.h drivers/cdrom/sector.c drivers/cdrom/defs.h \
    72         drivers/cdrom/cd_nrg.c drivers/cdrom/cd_cdi.c drivers/cdrom/cd_gdi.c \
    73         drivers/cdrom/edc_ecc.c drivers/cdrom/ecc.h drivers/cdrom/drive.c \
    74         drivers/cdrom/edc_crctable.h drivers/cdrom/edc_encoder.h drivers/cdrom/cdimpl.h \
    75 	drivers/cdrom/edc_l2sq.h drivers/cdrom/edc_scramble.h drivers/cdrom/cd_mmc.c \
    76 	drivers/cdrom/isofs.h drivers/cdrom/isofs.c drivers/cdrom/isomem.c \
    77 	sh4/sh4.def sh4/sh4core.in sh4/sh4x86.in sh4/sh4dasm.in sh4/sh4stat.in \
    78 	hotkeys.c hotkeys.h
    79 lxdream_CPPFLAGS = @LXDREAMCPPFLAGS@
    80 if BUILD_SHARED
    81 lxdream_SOURCES += plugin.c plugin.h
    82 endif	
    84 if BUILD_SH4X86
    85 lxdream_SOURCES += sh4/sh4x86.c xlat/x86/x86op.h \
    86         xlat/x86/ia32abi.h xlat/x86/amd64abi.h \
    87         sh4/sh4trans.c sh4/sh4trans.h sh4/mmux86.c \
    88         x86dasm/x86dasm.c x86dasm/x86dasm.h \
    89         x86dasm/i386-dis.c x86dasm/dis-init.c x86dasm/dis-buf.c \
    90         x86dasm/ansidecl.h x86dasm/bfd.h x86dasm/dis-asm.h \
    91         x86dasm/symcat.h x86dasm/sysdep.h
    93 test_testsh4x86_LDADD = @LXDREAM_LIBS@ @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@
    94 test_testsh4x86_CPPFLAGS = @LXDREAMCPPFLAGS@
    95 test_testsh4x86_SOURCES = test/testsh4x86.c x86dasm/x86dasm.c \
    96 	x86dasm/x86dasm.h x86dasm/i386-dis.c x86dasm/dis-init.c \
    97 	x86dasm/dis-buf.c \
    98 	sh4/sh4trans.c sh4/sh4x86.c xlat/xltcache.c sh4/sh4dasm.c \
    99 	xlat/xltcache.h mem.c util.c cpu.c
   101 check_PROGRAMS += test/testsh4x86
   102 endif
   104 if GUI_GTK
   105 lxdream_SOURCES += gtkui/gtkui.c gtkui/gtkui.h \
   106 	gtkui/gtk_win.c gtkui/gtkcb.c gtkui/gtk_cfg.c \
   107         gtkui/gtk_mmio.c gtkui/gtk_debug.c gtkui/gtk_dump.c \
   108         gtkui/gtk_ctrl.c gtkui/gtk_gd.c \
   109         drivers/io_glib.c drivers/video_gtk.c
   110 endif
   112 if GUI_COCOA
   113 lxdream_SOURCES += cocoaui/cocoaui.m cocoaui/cocoaui.h cocoaui/cocoa_cfg.m \
   114 	cocoaui/cocoa_win.m cocoaui/cocoa_gd.m cocoaui/cocoa_prefs.m \
   115 	cocoaui/cocoa_ctrl.m cocoaui/paths_osx.m \
   116 	drivers/io_osx.m drivers/video_osx.m \
   117 	drivers/mac_keymap.h drivers/mac_keymap.txt
   118 else
   119 lxdream_SOURCES += paths_unix.c
   120 endif
   122 if VIDEO_OSMESA
   123 lxdream_SOURCES += drivers/video_gdk.c
   124 endif
   126 if VIDEO_GLX 
   127 lxdream_SOURCES += drivers/video_glx.c drivers/video_glx.h
   128 endif
   130 if VIDEO_NSGL
   131 lxdream_SOURCES += drivers/video_nsgl.m drivers/video_nsgl.h
   132 endif
   134 if AUDIO_OSX
   135 lxdream_SOURCES += drivers/audio_osx.m
   136 endif
   138 if BUILD_SHARED
   140 pkglib_PROGRAMS += lxdream_dummy.@SOEXT@
   141 lxdream_dummy_@SOEXT@_SOURCES =
   142 lxdream_dummy_@SOEXT@_LDADD = lxdream_dummy.lo @SDL_LIBS@
   143 lxdream_dummy_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   144 lxdream_dummy.lo: drivers/dummy.c
   145 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   147 if AUDIO_SDL
   148 pkglib_PROGRAMS += audio_sdl.@SOEXT@
   149 audio_sdl_@SOEXT@_SOURCES =
   150 audio_sdl_@SOEXT@_LDADD = audio_sdl.lo @SDL_LIBS@
   151 audio_sdl_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   152 audio_sdl.lo: drivers/audio_sdl.c
   153 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   154 endif
   156 if AUDIO_PULSE
   157 pkglib_PROGRAMS += audio_pulse.@SOEXT@
   158 audio_pulse_@SOEXT@_SOURCES =
   159 audio_pulse_@SOEXT@_LDADD = audio_pulse.lo @PULSE_LIBS@
   160 audio_pulse_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   161 audio_pulse.lo: drivers/audio_pulse.c
   162 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   163 endif
   165 if AUDIO_ESOUND
   166 pkglib_PROGRAMS += audio_esd.@SOEXT@
   167 audio_esd_@SOEXT@_SOURCES =
   168 audio_esd_@SOEXT@_LDADD = audio_esd.lo @ESOUND_LIBS@
   169 audio_esd_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   170 audio_esd.lo: drivers/audio_esd.c
   171 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   172 endif
   174 if AUDIO_ALSA
   175 pkglib_PROGRAMS += audio_alsa.@SOEXT@
   176 audio_alsa_@SOEXT@_SOURCES =
   177 audio_alsa_@SOEXT@_LDADD = audio_alsa.lo @ALSA_LIBS@
   178 audio_alsa_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   179 audio_alsa.lo: drivers/audio_alsa.c
   180 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   181 endif
   183 if INPUT_LIRC
   184 pkglib_PROGRAMS += input_lirc.@SOEXT@
   185 input_lirc_@SOEXT@_SOURCES =
   186 input_lirc_@SOEXT@_LDADD = input_lirc.lo	 -llirc_client
   187 input_lirc_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   188 input_lirc.lo: drivers/input_lirc.c
   189 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   190 endif
   192 else # build statically
   193 if AUDIO_SDL
   194 lxdream_SOURCES += drivers/audio_sdl.c
   195 lxdream_LDADD += @SDL_LIBS@
   196 endif
   198 if AUDIO_PULSE
   199 lxdream_SOURCES += drivers/audio_pulse.c
   200 lxdream_LDADD += @PULSE_LIBS@
   201 endif
   203 if AUDIO_ESOUND
   204 lxdream_SOURCES += drivers/audio_esd.c
   205 lxdream_LDADD += @ESOUND_LIBS@
   206 endif
   208 if AUDIO_ALSA
   209 lxdream_SOURCES += drivers/audio_alsa.c
   210 lxdream_LDADD += @ALSA_LIBS@
   211 endif
   213 if INPUT_LIRC
   214 lxdream_SOURCES += drivers/input_lirc.c
   215 lxdream_LDADD += -llirc_client
   216 endif
   217 endif # end shared/static control
   219 if CDROM_LINUX
   220 lxdream_SOURCES += drivers/cdrom/cd_linux.c
   221 endif
   223 if CDROM_OSX
   224 lxdream_SOURCES += drivers/cdrom/cd_osx.c drivers/osx_iokit.m drivers/osx_iokit.h
   225 endif
   227 if CDROM_NONE
   228 lxdream_SOURCES += drivers/cdrom/cd_none.c
   229 endif
   231 if JOY_LINUX
   232 lxdream_SOURCES += drivers/joy_linux.c drivers/joy_linux.h
   233 endif
   237 gendec_LDADD = @GLIB_LIBS@ @GTK_LIBS@ $(INTLLIBS)
   238 genglsl_LDADD = @GLIB_LIBS@ @GTK_LIBS@ $(INTLLIBS)
   239 genmach_LDADD = @GLIB_LIBS@ @GTK_LIBS@ $(INTLLIBS)
   242 test_testxlt_SOURCES = test/testxlt.c xlat/xltcache.c xlat/xltcache.h
   244 sh4/sh4core.c: gendec$(EXEEXT) sh4/sh4.def sh4/sh4core.in
   245 	$(mkdir_p) `dirname $@`
   246 	./gendec $(srcdir)/sh4/sh4.def $(srcdir)/sh4/sh4core.in -o $@
   247 sh4/sh4dasm.c: gendec$(EXEEXT) sh4/sh4.def sh4/sh4dasm.in
   248 	$(mkdir_p) `dirname $@`
   249 	./gendec $(srcdir)/sh4/sh4.def $(srcdir)/sh4/sh4dasm.in -o $@
   250 sh4/sh4x86.c: gendec$(EXEEXT) sh4/sh4.def sh4/sh4x86.in
   251 	$(mkdir_p) `dirname $@`
   252 	./gendec $(srcdir)/sh4/sh4.def $(srcdir)/sh4/sh4x86.in -o $@
   253 sh4/sh4stat.c: gendec$(EXEEXT) sh4/sh4.def sh4/sh4stat.in
   254 	$(mkdir_p) `dirname $@`
   255 	./gendec $(srcdir)/sh4/sh4.def $(srcdir)/sh4/sh4stat.in -o $@
   256 pvr2/shaders.def: genglsl$(EXEEXT) pvr2/shaders.glsl
   257 	$(mkdir_p) `dirname $@`
   258 	./genglsl $(srcdir)/pvr2/shaders.glsl $@
   259 pvr2/shaders.h: pvr2/shaders.def
   260 drivers/mac_keymap.h: drivers/mac_keymap.txt drivers/genkeymap.pl
   261 	$(mkdir_p) `dirname $@`
   262 	$(srcdir)/drivers/genkeymap.pl mac $(srcdir)/drivers/mac_keymap.txt > $@
.