Search
lxdream.org :: lxdream/src/Makefile.am
lxdream 0.9.1
released Jun 29
Download Now
filename src/Makefile.am
changeset 1265:7c6c5d26fd2e
prev1264:74ad81710528
next1287:dac8f363f1fe
author nkeynes
date Tue Mar 06 12:42:33 2012 +1000 (8 years ago)
permissions -rw-r--r--
last change Merge ARM disassembler from binutils 2.22
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 lxdream_LINK = $(LINK) @LXDREAMLDFLAGS@
    39 lxdream_LDADD = liblxdream-core.a @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@ @LIBISOFS_LIBS@ $(INTLLIBS) @LXDREAM_LIBS@
    40 lxdream_SOURCES = main.c 
    41 lxdream_LIBS = liblxdream-core.a
    42 lxdream_CPPFLAGS = @LXDREAMCPPFLAGS@
    44 noinst_LIBRARIES = liblxdream-core.a
    45 liblxdream_core_a_CPPFLAGS = @LXDREAMCPPFLAGS@
    46 liblxdream_core_a_SOURCES = version.c config.c config.h lxdream.h dream.h gui.h cpu.c cpu.h hook.h \
    47         gettext.h mem.c mem.h sdram.c mmio.h watch.c \
    48         asic.c asic.h clock.h serial.h \
    49         syscall.c syscall.h bios.c dcload.c gdbserver.c \
    50         ioutil.c ioutil.h lxpaths.c lxpaths.h \
    51         gdrom/ide.c gdrom/ide.h gdrom/packet.h gdrom/gdrom.c gdrom/gdrom.h \
    52         dreamcast.c dreamcast.h eventq.c eventq.h \
    53         sh4/sh4.c sh4/intc.c sh4/intc.h sh4/sh4mem.c sh4/timer.c sh4/dmac.c \
    54         sh4/mmu.c sh4/sh4core.c sh4/sh4core.h sh4/sh4dasm.c sh4/sh4dasm.h \
    55         sh4/sh4mmio.c sh4/sh4mmio.h sh4/scif.c sh4/sh4stat.c sh4/sh4stat.h \
    56 	xlat/xltcache.c xlat/xltcache.h sh4/sh4.h sh4/dmac.h sh4/pmm.c \
    57 	sh4/cache.c sh4/mmu.h \
    58         aica/armcore.c aica/armcore.h aica/armdasm.c aica/armdasm.h aica/armmem.c \
    59         aica/aica.c aica/aica.h aica/audio.c aica/audio.h \
    60 	pvr2/pvr2.c pvr2/pvr2.h pvr2/pvr2mem.c pvr2/pvr2mmio.h \
    61 	pvr2/tacore.c pvr2/rendsort.c pvr2/tileiter.h pvr2/shaders.glsl \
    62 	pvr2/texcache.c pvr2/yuv.c pvr2/rendsave.c pvr2/scene.c pvr2/scene.h \
    63 	pvr2/shaders.h pvr2/shaders.def pvr2/glutil.c pvr2/glutil.h pvr2/glrender.c \
    64         maple/maple.c maple/maple.h \
    65         maple/controller.c maple/kbd.c maple/mouse.c maple/lightgun.c maple/vmu.c \
    66         loader.c loader.h elf.h bootstrap.c bootstrap.h util.c gdlist.c gdlist.h \
    67         vmu/vmuvol.c vmu/vmuvol.h vmu/vmulist.c vmu/vmulist.h \
    68 	display.c display.h dckeysyms.h \
    69 	drivers/audio_null.c drivers/video_null.c \
    70 	drivers/video_gl.c drivers/video_gl.h drivers/gl_fbo.c drivers/gl_vbo.c \
    71 	drivers/gl_sl.c drivers/serial_unix.c \
    72 	drivers/cdrom/cdrom.h drivers/cdrom/cdrom.c drivers/cdrom/drive.h \
    73 	drivers/cdrom/sector.h drivers/cdrom/sector.c drivers/cdrom/defs.h \
    74         drivers/cdrom/cd_nrg.c drivers/cdrom/cd_cdi.c drivers/cdrom/cd_gdi.c \
    75         drivers/cdrom/edc_ecc.c drivers/cdrom/ecc.h drivers/cdrom/drive.c \
    76         drivers/cdrom/edc_crctable.h drivers/cdrom/edc_encoder.h drivers/cdrom/cdimpl.h \
    77 	drivers/cdrom/edc_l2sq.h drivers/cdrom/edc_scramble.h drivers/cdrom/cd_mmc.c \
    78 	drivers/cdrom/isofs.h drivers/cdrom/isofs.c drivers/cdrom/isomem.c \
    79 	sh4/sh4.def sh4/sh4core.in sh4/sh4x86.in sh4/sh4dasm.in sh4/sh4stat.in \
    80 	hotkeys.c hotkeys.h
    82 if BUILD_PLUGINS
    83 lxdream_SOURCES += plugin.c plugin.h
    84 endif	
    86 if BUILD_SH4X86
    87 liblxdream_core_a_SOURCES += sh4/sh4x86.c xlat/x86/x86op.h \
    88         xlat/x86/ia32abi.h xlat/x86/amd64abi.h \
    89         xlat/xlatdasm.c xlat/xlatdasm.h \
    90         sh4/sh4trans.c sh4/sh4trans.h sh4/mmux86.c sh4/shadow.c \
    91         xlat/disasm/i386-dis.c xlat/disasm/dis-init.c xlat/disasm/dis-buf.c \
    92         xlat/disasm/ansidecl.h xlat/disasm/bfd.h xlat/disasm/dis-asm.h \
    93         xlat/disasm/symcat.h xlat/disasm/sysdep.h xlat/disasm/arm-dis.c \
    94         xlat/disasm/floatformat.c xlat/disasm/floatformat.h \
    95         xlat/disasm/arm.h xlat/disasm/safe-ctype.h xlat/disasm/safe-ctype.c
    97 test_testsh4x86_LDADD = @LXDREAM_LIBS@ @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@
    98 test_testsh4x86_CPPFLAGS = @LXDREAMCPPFLAGS@
    99 test_testsh4x86_SOURCES = test/testsh4x86.c xlat/xlatdasm.c \
   100 	xlat/xlatdasm.h xlat/disasm/i386-dis.c xlat/disasm/dis-init.c \
   101 	xlat/disasm/dis-buf.c xlat/disasm/arm-dis.c \
   102         xlat/disasm/arm.h xlat/disasm/safe-ctype.h xlat/disasm/safe-ctype.c \
   103         xlat/disasm/floatformat.c xlat/disasm/floatformat.h \
   104 	sh4/sh4trans.c sh4/sh4x86.c xlat/xltcache.c sh4/sh4dasm.c \
   105 	xlat/xltcache.h mem.c util.c cpu.c
   107 check_PROGRAMS += test/testsh4x86
   108 endif
   110 if GUI_GTK
   111 lxdream_SOURCES += gtkui/gtkui.c gtkui/gtkui.h \
   112 	gtkui/gtk_win.c gtkui/gtkcb.c gtkui/gtk_cfg.c \
   113         gtkui/gtk_mmio.c gtkui/gtk_debug.c gtkui/gtk_dump.c \
   114         gtkui/gtk_ctrl.c gtkui/gtk_gd.c \
   115         drivers/video_gtk.c
   116 endif
   118 if GUI_ANDROID
   119 lxdream_SOURCES += gui_none.c drivers/video_egl.c drivers/video_egl.h
   120 noinst_PROGRAMS=liblxdream.so
   121 liblxdream_so_LINK = $(LINK) -Wl,-soname,liblxdream.so -shared
   122 liblxdream_so_LDADD = liblxdream-core.a @GLIB_LIBS@ @GTK_LIBS@ @LIBPNG_LIBS@ @LIBISOFS_LIBS@ $(INTLLIBS) @LXDREAM_LIBS@ -lm
   123 liblxdream_so_SOURCES = gui_android.c drivers/cdrom/cd_none.c drivers/video_egl.c drivers/video_egl.h tqueue.c tqueue.h
   124 liblxdream_so_LIBS = liblxdream-core.a
   125 endif
   127 if GUI_COCOA
   128 liblxdream_core_a_SOURCES += cocoaui/paths_osx.m drivers/io_osx.m drivers/mac_keymap.h drivers/mac_keymap.txt
   129 lxdream_SOURCES += cocoaui/cocoaui.m cocoaui/cocoaui.h cocoaui/cocoa_cfg.m \
   130 	cocoaui/cocoa_win.m cocoaui/cocoa_gd.m cocoaui/cocoa_prefs.m \
   131 	cocoaui/cocoa_ctrl.m drivers/video_osx.m
   132 else
   133 liblxdream_core_a_SOURCES += paths_unix.c drivers/io_glib.c
   134 endif
   136 if VIDEO_OSMESA
   137 lxdream_SOURCES += drivers/video_gdk.c
   138 endif
   140 if VIDEO_GLX 
   141 lxdream_SOURCES += drivers/video_glx.c drivers/video_glx.h
   142 endif
   144 if VIDEO_NSGL
   145 lxdream_SOURCES += drivers/video_nsgl.m drivers/video_nsgl.h
   146 endif
   148 if AUDIO_OSX
   149 lxdream_SOURCES += drivers/audio_osx.m
   150 endif
   152 if BUILD_PLUGINS
   154 pkglib_PROGRAMS += lxdream_dummy.@SOEXT@
   155 lxdream_dummy_@SOEXT@_SOURCES =
   156 lxdream_dummy_@SOEXT@_LDADD = lxdream_dummy.lo @SDL_LIBS@
   157 lxdream_dummy_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   158 lxdream_dummy.lo: drivers/dummy.c
   159 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   161 if AUDIO_SDL
   162 pkglib_PROGRAMS += audio_sdl.@SOEXT@
   163 audio_sdl_@SOEXT@_SOURCES =
   164 audio_sdl_@SOEXT@_LDADD = audio_sdl.lo @SDL_LIBS@
   165 audio_sdl_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   166 audio_sdl.lo: drivers/audio_sdl.c
   167 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   168 endif
   170 if AUDIO_PULSE
   171 pkglib_PROGRAMS += audio_pulse.@SOEXT@
   172 audio_pulse_@SOEXT@_SOURCES =
   173 audio_pulse_@SOEXT@_LDADD = audio_pulse.lo @PULSE_LIBS@
   174 audio_pulse_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   175 audio_pulse.lo: drivers/audio_pulse.c
   176 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   177 endif
   179 if AUDIO_ESOUND
   180 pkglib_PROGRAMS += audio_esd.@SOEXT@
   181 audio_esd_@SOEXT@_SOURCES =
   182 audio_esd_@SOEXT@_LDADD = audio_esd.lo @ESOUND_LIBS@
   183 audio_esd_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   184 audio_esd.lo: drivers/audio_esd.c
   185 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   186 endif
   188 if AUDIO_ALSA
   189 pkglib_PROGRAMS += audio_alsa.@SOEXT@
   190 audio_alsa_@SOEXT@_SOURCES =
   191 audio_alsa_@SOEXT@_LDADD = audio_alsa.lo @ALSA_LIBS@
   192 audio_alsa_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   193 audio_alsa.lo: drivers/audio_alsa.c
   194 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   195 endif
   197 if INPUT_LIRC
   198 pkglib_PROGRAMS += input_lirc.@SOEXT@
   199 input_lirc_@SOEXT@_SOURCES =
   200 input_lirc_@SOEXT@_LDADD = input_lirc.lo	 -llirc_client
   201 input_lirc_@SOEXT@_LDFLAGS = $(PLUGINLDFLAGS)
   202 input_lirc.lo: drivers/input_lirc.c
   203 	$(COMPILE) -DPLUGIN $(PLUGINCFLAGS) -c $< -o $@
   204 endif
   206 else # build statically
   207 if AUDIO_SDL
   208 lxdream_SOURCES += drivers/audio_sdl.c
   209 lxdream_LDADD += @SDL_LIBS@
   210 endif
   212 if AUDIO_PULSE
   213 lxdream_SOURCES += drivers/audio_pulse.c
   214 lxdream_LDADD += @PULSE_LIBS@
   215 endif
   217 if AUDIO_ESOUND
   218 lxdream_SOURCES += drivers/audio_esd.c
   219 lxdream_LDADD += @ESOUND_LIBS@
   220 endif
   222 if AUDIO_ALSA
   223 lxdream_SOURCES += drivers/audio_alsa.c
   224 lxdream_LDADD += @ALSA_LIBS@
   225 endif
   227 if INPUT_LIRC
   228 lxdream_SOURCES += drivers/input_lirc.c
   229 lxdream_LDADD += -llirc_client
   230 endif
   231 endif # end shared/static control
   233 if CDROM_LINUX
   234 lxdream_SOURCES += drivers/cdrom/cd_linux.c
   235 endif
   237 if CDROM_OSX
   238 lxdream_SOURCES += drivers/cdrom/cd_osx.c drivers/osx_iokit.m drivers/osx_iokit.h
   239 endif
   241 if CDROM_NONE
   242 lxdream_SOURCES += drivers/cdrom/cd_none.c
   243 endif
   245 if JOY_LINUX
   246 lxdream_SOURCES += drivers/joy_linux.c drivers/joy_linux.h
   247 endif
   250 test_testxlt_SOURCES = test/testxlt.c xlat/xltcache.c xlat/xltcache.h
   251 test_testlxpaths_SOURCES = test/testlxpaths.c lxpaths.c
   252 test_testlxpaths_LDADD = @GLIB_LIBS@ @GTK_LIBS@
   254 GENDEC = tools/gendec$(EXEEXT)
   255 GENGLSL = tools/genglsl$(EXEEXT)
   256 GENMACH = totols/genmach$(EXEEXT)
   258 $(GENDEC) $(GENGLSL) $(GENMACH):
   259 	$(MAKE) $(AM_MAKEFLAGS) -C tools
   261 sh4/sh4core.c: $(GENDEC) sh4/sh4.def sh4/sh4core.in
   262 	$(mkdir_p) `dirname $@`
   263 	$(GENDEC) $(srcdir)/sh4/sh4.def $(srcdir)/sh4/sh4core.in -o $@
   264 sh4/sh4dasm.c: $(GENDEC) sh4/sh4.def sh4/sh4dasm.in
   265 	$(mkdir_p) `dirname $@`
   266 	$(GENDEC) $(srcdir)/sh4/sh4.def $(srcdir)/sh4/sh4dasm.in -o $@
   267 sh4/sh4x86.c: $(GENDEC) sh4/sh4.def sh4/sh4x86.in
   268 	$(mkdir_p) `dirname $@`
   269 	$(GENDEC) $(srcdir)/sh4/sh4.def $(srcdir)/sh4/sh4x86.in -o $@
   270 sh4/sh4stat.c: $(GENDEC) sh4/sh4.def sh4/sh4stat.in
   271 	$(mkdir_p) `dirname $@`
   272 	$(GENDEC) $(srcdir)/sh4/sh4.def $(srcdir)/sh4/sh4stat.in -o $@
   273 pvr2/shaders.def: $(GENGLSL) pvr2/shaders.glsl
   274 	$(mkdir_p) `dirname $@`
   275 	$(GENGLSL) $(srcdir)/pvr2/shaders.glsl -o $@
   276 pvr2/shaders.h: pvr2/shaders.def
   277 drivers/mac_keymap.h: dckeysyms.h drivers/mac_keymap.txt drivers/genkeymap.pl
   278 	$(mkdir_p) `dirname $@`
   279 	$(srcdir)/drivers/genkeymap.pl mac $(srcdir)/dckeysyms.h $(srcdir)/drivers/mac_keymap.txt $@
.