Added documentation install targets
[fw/sdcc] / as / Makefile
index 432ca1334546f1aca05204024e5d6e0fefa7967c..2f583ad0d6ed5884afb36717be1635a62c962785 100644 (file)
@@ -2,16 +2,20 @@ PRJDIR = ..
 include $(PRJDIR)/Makefile.common
 
 PORTS = z80 gbz80
+DOCS = README abstra.doc appendk.txt asmlnk.doc asxhtm.html format.txt
 
 all:
-       for i in $(PORTS); do make _as THIS=$$i; done
-
-_as:
-ifeq ($(THIS), gbz80)
-       make -C z80 BUILDDIR=../../bin EXT=-$(THIS)$(E) OPTS=-DGAMEBOY wary
-else
-       make -C z80 BUILDDIR=../../bin EXT=-$(THIS)$(E) wary
-endif
+       $(MAKE) -C z80 _as-z80 _as-gbz80 E=$(E) BUILDDIR=../../bin/
 
 clean:
-       make -C z80 clean
+       $(MAKE) -C z80 clean
+
+install: install-doc
+       $(INSTALL) $(PRJDIR)/bin/as-z80 `echo $(bindir)/as-z80|sed '$(transform)'`
+       $(STRIP) -s `echo $(bindir)/as-z80|sed '$(transform)'`
+       $(INSTALL) $(PRJDIR)/bin/as-gbz80 `echo $(bindir)/as-gbz80|sed '$(transform)'`
+       $(STRIP) -s `echo $(bindir)/as-gbz80|sed '$(transform)'`
+
+install-doc:
+       $(INSTALL) -d $(docdir)/aslink
+       cp -f `find doc -maxdepth 1 -not -type d` $(docdir)/aslink