Fixed up the z80 and gbz80 Makefiles to split out the objs - no more clean
[fw/sdcc] / link / Makefile
index 94d77cb95777cd06297efa3e46490dad427cb0a6..c4f6247c64c026cdbc445c148994e7c4e90767a5 100644 (file)
@@ -1,18 +1,11 @@
 PRJDIR = ..
+
 include $(PRJDIR)/Makefile.common
 
-PORTS = _z80 _gbz80
+PORTS = z80 gbz80
 
 all: 
-       for i in $(PORTS); do make $$i; done
-
-_z80: clean
-       make -C z80
-       cp z80/link$(E) $(TOPDIR)/bin/link-z80$(E)
-
-_gbz80: clean
-       make -C z80 "OPTS=-DGAMEBOY"
-       cp z80/link$(E) $(TOPDIR)/bin/link-gbz80$(E)
+       make -C z80 _link-z80 _link-gbz80 E=$(E) BUILDDIR=../../bin/
 
 clean:
        make -C z80 clean