Re-worked the makefiles and includes to target z80 and gbz80 as well
[fw/sdcc] / device / lib / z80 / Makefile
index 4dbb50f831ea15b1f36fe66fb020b8e6d9b6c058..5ad79105d6ec9b7fa99421edb987965ec3c39cc2 100644 (file)
@@ -2,14 +2,14 @@
 
 TOPDIR = ../../..
 
-SCC = $(TOPDIR)/bin/sdcc -mz80 -v
+SCC = $(TOPDIR)/bin/sdcc -mz80
 SAS = as-z80
 
 OBJ = div.o mul.o putchar.o string.o printf.o # asm_strings.o
 LIB = z80.lib
 CC = $(SCC)
 AS = $(SAS)
-CFLAGS = -I../include -I. --dumpall
+CFLAGS = -I../include -I.
 
 all: $(LIB) crt0.o
 
@@ -17,7 +17,10 @@ $(LIB): $(OBJ) Makefile _dummy
        rm -f $(LIB)
        for i in $(OBJ); do echo $$i >> $(LIB); done
 
+.c.o:
+       $(CC) $(CFLAGS) -c $@
+
 _dummy:
 
 clean:
-       rm -f $(OBJ) *~ $(CLEANSPEC)
+       rm -f $(OBJ) *~ $(CLEANSPEC) *.dump*