Search
lxdream.org :: lxdream/Makefile.am
lxdream 0.9.1
released Jun 29
Download Now
filename Makefile.am
changeset 1249:a81130f57df6
prev1245:01e0020adf88
next1255:d63f73cc586f
author nkeynes
date Sat Mar 03 16:06:58 2012 +1000 (7 years ago)
permissions -rw-r--r--
last change Fully clean the android part before building it - dependencies don't seem to
work properly.
Add install-adb rule for convenience
view annotate diff log raw
     1 ## Process this file with automake to produce Makefile.in
     3 POD2MAN=@POD2MAN@
     4 BUNDLE=lxdream.app
     5 DMGFILE=lxdream-$(VERSION)-$(host_cpu).dmg
     6 DMGLABEL=Lxdream-$(VERSION)-$(host_cpu)
     8 if BUILD_SYSTEST
     9   TEST_SUBDIR = test
    10 endif
    11 SUBDIRS = src po $(TEST_SUBDIR)
    13 EXTRA_DIST = autogen.sh lxdream.pod lxdream.desktop bundlelibs.pl
    15 dist_sysconf_DATA = lxdreamrc
    16 CLEANFILES = lxdream.1
    17 man_MANS = lxdream.1
    19 lxdream.1: lxdream.pod
    20 	$(POD2MAN) -c "Lxdream: A Dreamcast emulator" $< $@
    22 install-data-local:
    23 	@$(NORMAL_INSTALL)
    24 	if test -d $(srcdir)/pixmaps; then \
    25 	  $(mkinstalldirs) $(DESTDIR)$(datadir)/pixmaps/$(PACKAGE); \
    26 	  for pixmap in $(srcdir)/pixmaps/*.png $(srcdir)/pixmaps/*.gif; do \
    27 	    if test -f $$pixmap; then \
    28 	      $(INSTALL_DATA) $$pixmap $(DESTDIR)$(datadir)/pixmaps/$(PACKAGE); \
    29 	    fi \
    30 	  done \
    31 	fi
    32 	$(mkinstalldirs) $(DESTDIR)$(datadir)/applications
    33 	$(INSTALL_DATA) $(srcdir)/lxdream.desktop $(DESTDIR)$(datadir)/applications
    34 	$(INSTALL_DATA) $(srcdir)/pixmaps/lxdream.png $(DESTDIR)$(datadir)/pixmaps
    35 	$(mkinstalldirs) $(DESTDIR)$(sysconfdir)
    37 uninstall-local:
    38 	@$(NORMAL_UNINSTALL) 
    39 	rm -rf $(DESTDIR)$(datadir)/pixmaps/$(PACKAGE)
    40 	rm -f $(DESTDIR)$(datadir)/pixmaps/lxdream.png
    41 	rm -f $(DESTDIR)$(datadir)/applications/lxdream.desktop
    43 clean-local:
    44 	rm -rf $(BUNDLE)
    46 dist-hook:
    47 	if test -d $(srcdir)/pixmaps; then \
    48 	  mkdir $(distdir)/pixmaps; \
    49 	  for pixmap in $(srcdir)/pixmaps/*; do \
    50 	    if test -f $$pixmap; then \
    51 	      cp -p $$pixmap $(distdir)/pixmaps; \
    52 	    fi \
    53 	  done \
    54 	fi
    55 	if test -d $(srcdir)/debian; then \
    56 	  mkdir $(distdir)/debian; \
    57 	  for f in $(srcdir)/debian/*; do \
    58 	    if test -f $$f; then \
    59 	      cp -p $$f $(distdir)/debian; \
    60 	    fi \
    61 	  done \
    62 	fi
    64 if GUI_COCOA
    65 # Build a Mac OS X bundle. This is meaningless anywhere else
    66 all-local:
    67 	@echo --- Building Mac Bundle ---
    68 	rm -rf $(BUNDLE)
    69 	mkdir -p $(BUNDLE)/Contents/MacOS
    70 	mkdir -p $(BUNDLE)/Contents/Resources
    71 	mkdir -p $(BUNDLE)/Contents/Plugins
    72 	cp Info.plist $(BUNDLE)/Contents
    73 	cp $(srcdir)/lxdreamrc $(BUNDLE)/Contents/Resources
    74 	cp src/lxdream $(BUNDLE)/Contents/MacOS
    75 	cp -R src/*.dylib $(BUNDLE)/Contents/Plugins
    76 	cp -R $(srcdir)/pixmaps/* $(BUNDLE)/Contents/Resources
    77 	$(srcdir)/bundlelibs.pl $(BUNDLE)/Contents/MacOS/lxdream $(BUNDLE)/Contents/Frameworks
    78 	for cat in $(CATALOGS); do \
    79 	   catname=`basename "$$cat"`; \
    80 	   catname=`echo $$catname|sed -e 's/$(CATOBJEXT)$$//'`; \
    81 	   mkdir -p "$(BUNDLE)/Contents/Resources/$$catname/LC_MESSAGES"; \
    82 	   cp "$(top_srcdir)/po/$$cat" "$(BUNDLE)/Contents/Resources/$$catname/LC_MESSAGES/lxdream$(INSTOBJEXT)"; \
    83 	done
    84 	@echo --- Done ---
    85 endif
    87 # Build a Mac DMG disk image.
    88 dmg: $(BUNDLE)
    89 	@echo --- Building DMG image ---
    90 	hdiutil create -fs HFS+ -size 5m -volname $(DMGLABEL) $(DMGFILE)
    91 	hdiutil attach -mountpoint tmp.mount $(DMGFILE)
    92 	cp -Rdp $(BUNDLE) tmp.mount/
    93 	cp dmg.layout tmp.mount/.DS_Store
    94 	ln -s /Applications tmp.mount/Applications
    95 	hdiutil unmount tmp.mount
    96 	zip -9 $(DMGFILE).zip $(DMGFILE)
    97 	rm $(DMGFILE)
    98 	@echo --- Done ---
   100 bundle: all
   102 if GUI_ANDROID
   103 all-local:
   104 	(TARGETDIR="`pwd`/android" && cd $(srcdir)/android && \
   105 	    $(ANT) -buildfile build.xml -Dsdk.dir=$(ANDROID_SDK_HOME) \
   106 	       -Dout.dir="$$TARGETDIR" -Dnative.libs.dir="$$TARGETDIR/libs" \
   107 	       -Dnative.libs.absolute.dir="$$TARGETDIR/libs" \
   108 	       -Dtarget=$(ANDROID_SDK_VERSION) clean )
   109 	$(mkdir_p) android/libs/armeabi
   110 	$(INSTALL) src/liblxdream.so android/libs/armeabi/liblxdream.so
   111 	$(INSTALL) $(ANDROID_GDBSERVER) android/libs/armeabi/gdbserver
   112 	$(STRIP) --strip-unneeded android/libs/armeabi/liblxdream.so
   113 	(TARGETDIR="`pwd`/android" && cd $(srcdir)/android && \
   114 	    $(ANT) -buildfile build.xml -Dsdk.dir=$(ANDROID_SDK_HOME) \
   115 	       -Dout.dir="$$TARGETDIR" -Dnative.libs.dir="$$TARGETDIR/libs" \
   116 	       -Dnative.libs.absolute.dir="$$TARGETDIR/libs" \
   117 	       -Dtarget=$(ANDROID_SDK_VERSION) debug )
   118 	cp android/Lxdream-debug.apk Lxdream-debug.apk
   120 install-adb:
   121 	$(ANDROID_SDK_HOME)/platform-tools/adb install -r Lxdream-debug.apk
   123 endif
.