]> git.zerfleddert.de Git - micropolis/blobdiff - Makefile
src/sim/makefile: Micropolis build fixes for recent macOS
[micropolis] / Makefile
index 8b899fbedb7695aa89b2b8d5e5ca10d1e47b1f8c..dc804a4c9923af3533ba3bbcb8610dbccddfd535 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 PREFIX=/usr/local
 DATADIR=$(PREFIX)/share/micropolis
 PREFIX=/usr/local
 DATADIR=$(PREFIX)/share/micropolis
-LIBEXECDIR=$(PREFIX)/libexec
+LIBEXECDIR=$(PREFIX)/libexec/micropolis
 BINDIR=$(PREFIX)/bin
 DOCDIR=$(PREFIX)/share/doc/micropolis
 PIXMAPDIR=$(PREFIX)/share/pixmaps
 BINDIR=$(PREFIX)/bin
 DOCDIR=$(PREFIX)/share/doc/micropolis
 PIXMAPDIR=$(PREFIX)/share/pixmaps
@@ -64,9 +64,10 @@ install-dirs:
 install-bin:
        $(INSTALL) -m 0755 res/sim $(DESTDIR)/$(LIBEXECDIR)/sim
        $(INSTALL) -m 0755 res/sounds/player $(DESTDIR)/$(DATADIR)/res/sounds/player
 install-bin:
        $(INSTALL) -m 0755 res/sim $(DESTDIR)/$(LIBEXECDIR)/sim
        $(INSTALL) -m 0755 res/sounds/player $(DESTDIR)/$(DATADIR)/res/sounds/player
-       echo "SIMHOME=$(DATADIR); export SIMHOME" >$(DESTDIR)/$(BINDIR)/micropolis
+       echo "#!/bin/sh" >$(DESTDIR)/$(BINDIR)/micropolis
+       echo "SIMHOME=$(DATADIR); export SIMHOME" >>$(DESTDIR)/$(BINDIR)/micropolis
        echo "echo \"Starting Micropolis in \$${SIMHOME} ... \"" >>$(DESTDIR)/$(BINDIR)/micropolis
        echo "echo \"Starting Micropolis in \$${SIMHOME} ... \"" >>$(DESTDIR)/$(BINDIR)/micropolis
-       echo "cd $(DATADIR) && $(LIBEXECDIR)/sim \$$*" >>$(DESTDIR)/$(BINDIR)/micropolis
+       echo "cd $(DATADIR) && exec $(LIBEXECDIR)/sim \"\$$@\"" >>$(DESTDIR)/$(BINDIR)/micropolis
        chmod 755 $(DESTDIR)/$(BINDIR)/micropolis
 
 install-res: install-res-sounds install-res-dejavu-lgc
        chmod 755 $(DESTDIR)/$(BINDIR)/micropolis
 
 install-res: install-res-sounds install-res-dejavu-lgc
@@ -93,6 +94,32 @@ install-desktop:
        $(INSTALL) -m 0644 Micropolis.desktop $(DESTDIR)/$(APPLICATIONSDIR)/micropolis.desktop
        $(INSTALL) -m 0644 Micropolis.png $(DESTDIR)/$(PIXMAPDIR)/micropolis.png
 
        $(INSTALL) -m 0644 Micropolis.desktop $(DESTDIR)/$(APPLICATIONSDIR)/micropolis.desktop
        $(INSTALL) -m 0644 Micropolis.png $(DESTDIR)/$(PIXMAPDIR)/micropolis.png
 
+uninstall:
+       rm -f $(DESTDIR)/$(BINDIR)/micropolis
+       rm -f $(DESTDIR)/$(LIBEXECDIR)/sim
+       -rmdir $(DESTDIR)/$(LIBEXECDIR)
+       rm -f $(DESTDIR)/$(DATADIR)/res/sounds/player
+       rm -f $(DESTDIR)/$(DATADIR)/res/sounds/*.wav
+       -rmdir $(DESTDIR)/$(DATADIR)/res/sounds
+       rm -f $(DESTDIR)/$(DATADIR)/res/dejavu-lgc/*ttf \
+               $(DESTDIR)/$(DATADIR)/res/dejavu-lgc/fonts.alias \
+               $(DESTDIR)/$(DATADIR)/res/dejavu-lgc/fonts.dir \
+               $(DESTDIR)/$(DATADIR)/res/dejavu-lgc/fonts.scale
+       -rmdir $(DESTDIR)/$(DATADIR)/res/dejavu-lgc
+       for file in $(RES); do \
+               rm $(DESTDIR)/$(DATADIR)/$$file; \
+       done
+       -rmdir $(DESTDIR)/$(DATADIR)/res
+       rm -f $(DESTDIR)/$(DATADIR)/images/*.xpm
+       -rmdir $(DESTDIR)/$(DATADIR)/images
+       rm -f $(DESTDIR)/$(DATADIR)/cities/*.cty
+       -rmdir $(DESTDIR)/$(DATADIR)/cities
+       -rmdir $(DESTDIR)/$(DATADIR)
+       rm -f $(DESTDIR)/$(DOCDIR)/*.html $(DESTDIR)/$(DOCDIR)/README
+       -rmdir $(DESTDIR)/$(DOCDIR)
+       rm -f $(DESTDIR)/$(APPLICATIONSDIR)/micropolis.desktop
+       rm -f $(DESTDIR)/$(PIXMAPDIR)/micropolis.png
+
 .PHONY: all clean install install-dirs install-bin install-res \
        install-res-sounds install-res-dejavu-lgc install-images \
 .PHONY: all clean install install-dirs install-bin install-res \
        install-res-sounds install-res-dejavu-lgc install-images \
-       install-cities install-doc install-desktop tcl tk tclx sim
+       install-cities install-doc install-desktop uninstall tcl tk tclx sim
Impressum, Datenschutz