summaryrefslogtreecommitdiffstats
path: root/sw/z80/drivers/makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sw/z80/drivers/makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/sw/z80/drivers/makefile b/sw/z80/drivers/makefile
new file mode 100644
index 0000000..5d6d8ee
--- /dev/null
+++ b/sw/z80/drivers/makefile
@@ -0,0 +1,22 @@
+# Drivers library
+
+LIB := build/drivers.a
+SOURCES := $(wildcard *.c)
+OBJECTS := $(patsubst %.c,build/%.rel,$(SOURCES))
+
+CC := sdcc
+AR := sdar
+CFLAGS := -mz80 -Iinclude -I../arch -DDEBUG
+
+.PHONY: dirs clean
+$(LIB): $(OBJECTS)
+ $(AR) rcs $@ $(OBJECTS)
+
+$(OBJECTS): build/%.rel: %.c $(SOURCES) dirs
+ $(CC) $(CFLAGS) -c $< -o $@
+
+dirs:
+ mkdir -p build
+
+clean:
+ - rm -rd build/*