Search
lxdream.org :: lxdream/src/Makefile.am
lxdream 0.9.1
released Jun 29
Download Now
filename src/Makefile.am
changeset 1213:d5ea3e98557b
prev1211:eecdeb37934a
next1225:73dd41cb37a8
author nkeynes
date Mon Feb 13 12:26:01 2012 +1000 (8 years ago)
permissions -rw-r--r--
last change Add GTK_LIBS to ldadd for testlxpaths, as GLIB_LIBS isn't defined for GTK
builds...
view annotate diff log raw
     1 ## Process this file with automake to produce Makefile.in
     3 SUBDIRS=tools
     5 SVNVERSION=@SVNVERSION@
     6 INCLUDES = \
     7 	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
     8 	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
     9 	-DPACKAGE_PLUGIN_DIR=\""$(pkglibdir)"\" \
    10 	-DPACKAGE_CONF_DIR=\""$(sysconfdir)"\" \
    11         -Ish4 \
    12 	@GLIB_CFLAGS@ @GTK_CFLAGS@ @LIBPNG_CFLAGS@ @PULSE_CFLAGS@ @ESOUND_CFLAGS@ @ALSA_CFLAGS@ @SDL_CFLAGS@ @LIBISOFS_CFLAGS@
    14 SOEXT=@SOEXT@
    15 PLUGINCFLAGS = @PLUGINCFLAGS@ 
    16 PLUGINLDFLAGS = @PLUGINLDFLAGS@
    17 bin_PROGRAMS = lxdream
    18 check_PROGRAMS = test/testxlt test/testlxpaths
    20 pkglib_PROGRAMS=
    21 EXTRA_DIST=drivers/genkeymap.pl checkver.pl drivers/dummy.c
    22 AM_CFLAGS = -D__EXTENSIONS__ -D_BSD_SOURCE -D_GNU_SOURCE
    24 .PHONY: checkversion
    25 checkversion:
    26 	@$(srcdir)/checkver.pl "$(VERSION)" "$(top_srcdir)" version.c
    28 version.c: checkversion
    30 TESTS = test/testxlt test/testlxpaths
    31 BUILT_SOURCES = 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 CLEANFILES = sh4/sh4core.c sh4/sh4dasm.c sh4/sh4x86.c sh4/sh4stat.c \
    34 	pvr2/shaders.def pvr2/shaders.h drivers/mac_keymap.h version.c  \
    35 	audio_alsa.lo audio_sdl.lo audio_esd.lo audio_pulse.lo input_lirc.lo \
    36 	lxdream_dummy.lo
    38 #all-am: checkversion
    40 lxdream_LINK = $(LINK) @LXDREAMLDFLAGS@
    41 lxdream_LDADD = @LXDREAM_LIBS@ @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@ @LIBISOFS_LIBS@ $(INTLLIBS)
    42 lxdream_SOURCES = \
    43         main.c version.c config.c config.h lxdream.h dream.h gui.h cpu.c cpu.h hook.h \
    44         gettext.h mem.c mem.h sdram.c mmio.h watch.c \
    45         asic.c asic.h clock.h serial.h \
    46         syscall.c syscall.h bios.c dcload.c gdbserver.c \
    47         ioutil.c ioutil.h lxpaths.c lxpaths.h \
    48         gdrom/ide.c gdrom/ide.h gdrom/packet.h gdrom/gdrom.c gdrom/gdrom.h \
    49         dreamcast.c dreamcast.h eventq.c eventq.h \
    50         sh4/sh4.c sh4/intc.c sh4/intc.h sh4/sh4mem.c sh4/timer.c sh4/dmac.c \
    51         sh4/mmu.c sh4/sh4core.c sh4/sh4core.h sh4/sh4dasm.c sh4/sh4dasm.h \
    52         sh4/sh4mmio.c sh4/sh4mmio.h sh4/scif.c sh4/sh4stat.c sh4/sh4stat.h \
    53 	xlat/xltcache.c xlat/xltcache.h sh4/sh4.h sh4/dmac.h sh4/pmm.c \
    54 	sh4/cache.c sh4/mmu.h \
    55         aica/armcore.c aica/armcore.h aica/armdasm.c aica/armdasm.h aica/armmem.c \
    56         aica/aica.c aica/aica.h aica/audio.c aica/audio.h \
    57 	pvr2/pvr2.c pvr2/pvr2.h pvr2/pvr2mem.c pvr2/pvr2mmio.h \
    58 	pvr2/tacore.c pvr2/rendsort.c pvr2/tileiter.h pvr2/shaders.glsl \
    59 	pvr2/texcache.c pvr2/yuv.c pvr2/rendsave.c pvr2/scene.c pvr2/scene.h \
    60 	pvr2/gl_sl.c pvr2/shaders.h pvr2/shaders.def pvr2/glutil.c pvr2/glutil.h pvr2/glrender.c \
    61         maple/maple.c maple/maple.h \
    62         maple/controller.c maple/kbd.c maple/mouse.c maple/lightgun.c maple/vmu.c \
    63         loader.c loader.h elf.h bootstrap.c bootstrap.h util.c gdlist.c gdlist.h \
    64         vmu/vmuvol.c vmu/vmuvol.h vmu/vmulist.c vmu/vmulist.h \
    65 	display.c display.h dckeysyms.h \
    66 	drivers/audio_null.c drivers/video_null.c \
    67 	drivers/video_gl.c drivers/video_gl.h drivers/gl_fbo.c drivers/gl_vbo.c \
    68 	drivers/serial_unix.c \
    69 	drivers/cdrom/cdrom.h drivers/cdrom/cdrom.c drivers/cdrom/drive.h \
    70 	drivers/cdrom/sector.h drivers/cdrom/sector.c drivers/cdrom/defs.h \
    71         drivers/cdrom/cd_nrg.c drivers/cdrom/cd_cdi.c drivers/cdrom/cd_gdi.c \
    72         drivers/cdrom/edc_ecc.c drivers/cdrom/ecc.h drivers/cdrom/drive.c \
    73         drivers/cdrom/edc_crctable.h drivers/cdrom/edc_encoder.h drivers/cdrom/cdimpl.h \
    74 	drivers/cdrom/edc_l2sq.h drivers/cdrom/edc_scramble.h drivers/cdrom/cd_mmc.c \
    75 	drivers/cdrom/isofs.h drivers/cdrom/isofs.c drivers/cdrom/isomem.c \
    76 	sh4/sh4.def sh4/sh4core.in sh4/sh4x86.in sh4/sh4dasm.in sh4/sh4stat.in \
    77 	hotkeys.c hotkeys.h
    78 lxdream_CPPFLAGS = @LXDREAMCPPFLAGS@
    79 if BUILD_SHARED
    80 lxdream_SOURCES += plugin.c plugin.h
    81 endif	
    83 if BUILD_SH4X86
    84 lxdream_SOURCES += sh4/sh4x86.c xlat/x86/x86op.h \
    85         xlat/x86/ia32abi.h xlat/x86/amd64abi.h \
    86         sh4/sh4trans.c sh4/sh4trans.h sh4/mmux86.c sh4/shadow.c \
    87         x86dasm/x86dasm.c x86dasm/x86dasm.h \
    88         x86dasm/i386-dis.c x86dasm/dis-init.c x86dasm/dis-buf.c \
    89         x86dasm/ansidecl.h x86dasm/bfd.h x86dasm/dis-asm.h \
    90         x86dasm/symcat.h x86dasm/sysdep.h
    92 test_testsh4x86_LDADD = @LXDREAM_LIBS@ @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@
    93 test_testsh4x86_CPPFLAGS = @LXDREAMCPPFLAGS@
    94 test_testsh4x86_SOURCES = test/testsh4x86.c x86dasm/x86dasm.c \
    95 	x86dasm/x86dasm.h x86dasm/i386-dis.c x86dasm/dis-init.c \
    96 	x86dasm/dis-buf.c \
    97 	sh4/sh4trans.c sh4/sh4x86.c xlat/xltcache.c sh4/sh4dasm.c \
    98 	xlat/xltcache.h mem.c util.c cpu.c
   100 check_PROGRAMS += test/testsh4x86
   101 endif
   103 if GUI_GTK
   104 lxdream_SOURCES += gtkui/gtkui.c gtkui/gtkui.h \
   105 	gtkui/gtk_win.c gtkui/gtkcb.c gtkui/gtk_cfg.c \
   106         gtkui/gtk_mmio.c gtkui/gtk_debug.c gtkui/gtk_dump.c \
   107         gtkui/gtk_ctrl.c gtkui/gtk_gd.c \
   108         drivers/io_glib.c drivers/video_gtk.c
   109 endif
   111 if GUI_COCOA
   112 lxdream_SOURCES += cocoaui/cocoaui.m cocoaui/cocoaui.h cocoaui/cocoa_cfg.m \
   113 	cocoaui/cocoa_win.m cocoaui/cocoa_gd.m cocoaui/cocoa_prefs.m \
   114 	cocoaui/cocoa_ctrl.m cocoaui/paths_osx.m \
   115 	drivers/io_osx.m drivers/video_osx.m \
   116 	drivers/mac_keymap.h drivers/mac_keymap.txt
   117 else
   118 lxdream_SOURCES += paths_unix.c
   119 endif
   121 if VIDEO_OSMESA
   122 lxdream_SOURCES += drivers/video_gdk.c
   123 endif
   125 if VIDEO_GLX 
   126 lxdream_SOURCES += drivers/video_glx.c drivers/video_glx.h
   127 endif
   129 if VIDEO_NSGL
   130 lxdream_SOURCES += drivers/video_nsgl.m drivers/video_nsgl.h
   131 endif
   133 if AUDIO_OSX
   134 lxdream_SOURCES += drivers/audio_osx.m
   135 endif
   137 if BUILD_SHARED
   139 pkglib_PROGRAMS += lxdream_dummy.@SOEXT@
   140 lxdream_dummy_@SOEXT@_SOURCES =
   141 lxdream_dummy_@SOEXT@_LDADD = lxdream_dummy.lo @SDL_LIBS@
   142 lxdream_dummy_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   143 lxdream_dummy.lo: drivers/dummy.c
   144 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   146 if AUDIO_SDL
   147 pkglib_PROGRAMS += audio_sdl.@SOEXT@
   148 audio_sdl_@SOEXT@_SOURCES =
   149 audio_sdl_@SOEXT@_LDADD = audio_sdl.lo @SDL_LIBS@
   150 audio_sdl_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   151 audio_sdl.lo: drivers/audio_sdl.c
   152 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   153 endif
   155 if AUDIO_PULSE
   156 pkglib_PROGRAMS += audio_pulse.@SOEXT@
   157 audio_pulse_@SOEXT@_SOURCES =
   158 audio_pulse_@SOEXT@_LDADD = audio_pulse.lo @PULSE_LIBS@
   159 audio_pulse_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   160 audio_pulse.lo: drivers/audio_pulse.c
   161 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   162 endif
   164 if AUDIO_ESOUND
   165 pkglib_PROGRAMS += audio_esd.@SOEXT@
   166 audio_esd_@SOEXT@_SOURCES =
   167 audio_esd_@SOEXT@_LDADD = audio_esd.lo @ESOUND_LIBS@
   168 audio_esd_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   169 audio_esd.lo: drivers/audio_esd.c
   170 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   171 endif
   173 if AUDIO_ALSA
   174 pkglib_PROGRAMS += audio_alsa.@SOEXT@
   175 audio_alsa_@SOEXT@_SOURCES =
   176 audio_alsa_@SOEXT@_LDADD = audio_alsa.lo @ALSA_LIBS@
   177 audio_alsa_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   178 audio_alsa.lo: drivers/audio_alsa.c
   179 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   180 endif
   182 if INPUT_LIRC
   183 pkglib_PROGRAMS += input_lirc.@SOEXT@
   184 input_lirc_@SOEXT@_SOURCES =
   185 input_lirc_@SOEXT@_LDADD = input_lirc.lo	 -llirc_client
   186 input_lirc_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   187 input_lirc.lo: drivers/input_lirc.c
   188 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   189 endif
   191 else # build statically
   192 if AUDIO_SDL
   193 lxdream_SOURCES += drivers/audio_sdl.c
   194 lxdream_LDADD += @SDL_LIBS@
   195 endif
   197 if AUDIO_PULSE
   198 lxdream_SOURCES += drivers/audio_pulse.c
   199 lxdream_LDADD += @PULSE_LIBS@
   200 endif
   202 if AUDIO_ESOUND
   203 lxdream_SOURCES += drivers/audio_esd.c
   204 lxdream_LDADD += @ESOUND_LIBS@
   205 endif
   207 if AUDIO_ALSA
   208 lxdream_SOURCES += drivers/audio_alsa.c
   209 lxdream_LDADD += @ALSA_LIBS@
   210 endif
   212 if INPUT_LIRC
   213 lxdream_SOURCES += drivers/input_lirc.c
   214 lxdream_LDADD += -llirc_client
   215 endif
   216 endif # end shared/static control
   218 if CDROM_LINUX
   219 lxdream_SOURCES += drivers/cdrom/cd_linux.c
   220 endif
   222 if CDROM_OSX
   223 lxdream_SOURCES += drivers/cdrom/cd_osx.c drivers/osx_iokit.m drivers/osx_iokit.h
   224 endif
   226 if CDROM_NONE
   227 lxdream_SOURCES += drivers/cdrom/cd_none.c
   228 endif
   230 if JOY_LINUX
   231 lxdream_SOURCES += drivers/joy_linux.c drivers/joy_linux.h
   232 endif
   235 test_testxlt_SOURCES = test/testxlt.c xlat/xltcache.c xlat/xltcache.h
   236 test_testlxpaths_SOURCES = test/testlxpaths.c lxpaths.c
   237 test_testlxpaths_LDADD = @GLIB_LIBS@ @GTK_LIBS@
   239 GENDEC = tools/gendec$(EXEEXT)
   240 GENGLSL = tools/genglsl$(EXEEXT)
   241 GENMACH = totols/genmach$(EXEEXT)
   243 $(GENDEC) $(GENGLSL) $(GENMACH):
   244 	$(MAKE) $(AM_MAKEFLAGS) -C tools
   246 sh4/sh4core.c: $(GENDEC) sh4/sh4.def sh4/sh4core.in
   247 	$(mkdir_p) `dirname $@`
   248 	$(GENDEC) $(srcdir)/sh4/sh4.def $(srcdir)/sh4/sh4core.in -o $@
   249 sh4/sh4dasm.c: $(GENDEC) sh4/sh4.def sh4/sh4dasm.in
   250 	$(mkdir_p) `dirname $@`
   251 	$(GENDEC) $(srcdir)/sh4/sh4.def $(srcdir)/sh4/sh4dasm.in -o $@
   252 sh4/sh4x86.c: $(GENDEC) sh4/sh4.def sh4/sh4x86.in
   253 	$(mkdir_p) `dirname $@`
   254 	$(GENDEC) $(srcdir)/sh4/sh4.def $(srcdir)/sh4/sh4x86.in -o $@
   255 sh4/sh4stat.c: $(GENDEC) sh4/sh4.def sh4/sh4stat.in
   256 	$(mkdir_p) `dirname $@`
   257 	$(GENDEC) $(srcdir)/sh4/sh4.def $(srcdir)/sh4/sh4stat.in -o $@
   258 pvr2/shaders.def: $(GENGLSL) pvr2/shaders.glsl
   259 	$(mkdir_p) `dirname $@`
   260 	$(GENGLSL) $(srcdir)/pvr2/shaders.glsl $@
   261 pvr2/shaders.h: pvr2/shaders.def
   262 drivers/mac_keymap.h: dckeysyms.h drivers/mac_keymap.txt drivers/genkeymap.pl
   263 	$(mkdir_p) `dirname $@`
   264 	$(srcdir)/drivers/genkeymap.pl mac $(srcdir)/dckeysyms.h $(srcdir)/drivers/mac_keymap.txt $@
.