+install: res/sim install-dirs install-bin install-res install-images install-cities install-doc
+
+install-dirs:
+ $(INSTALL) -d $(DIRS)
+
+install-bin:
+ $(INSTALL) -m 0755 res/sim $(LIBEXECDIR)/sim
+ $(INSTALL) -m 0755 res/sounds/player $(DATADIR)/res/sounds/player
+ echo "SIMHOME=$(DATADIR); export SIMHOME" >$(PREFIX)/bin/Micropolis
+ echo "echo \"Starting Micropolis in \$${SIMHOME} ... \"" >>$(PREFIX)/bin/Micropolis
+ echo "cd $(DATADIR) && $(LIBEXECDIR)/sim \$$*" >>$(PREFIX)/bin/Micropolis
+ chmod 755 $(PREFIX)/bin/Micropolis
+
+install-res: install-res-sounds install-res-dejavu-lgc
+ for file in $(RES); do \
+ install -m 0644 $$file $(DATADIR)/$$file; \
+ done
+
+install-res-sounds:
+ find res/sounds -type f -name \*.wav -exec $(INSTALL) -m 0644 {} $(DATADIR)/res/sounds/ \;
+
+install-res-dejavu-lgc:
+ find res/dejavu-lgc -type f -exec $(INSTALL) -m 0644 {} $(DATADIR)/res/dejavu-lgc/ \;
+
+install-images:
+ find images -type f -exec $(INSTALL) -m 0644 {} $(DATADIR)/images/ \;
+
+install-cities:
+ find cities -type f -exec $(INSTALL) -m 0644 {} $(DATADIR)/cities/ \;
+
+install-doc:
+ find manual -type f -exec $(INSTALL) -m 0644 {} $(DOCDIR)/ \;
+
+.PHONY: all clean install install-dirs install-bin install-res \
+ install-res-sounds install-res-dejavu-lgc install-images \
+ install-cities install-doc tcl tk tclx sim