summaryrefslogtreecommitdiff
path: root/src/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/makefile')
-rw-r--r--src/makefile58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/makefile b/src/makefile
new file mode 100644
index 0000000..cc01f38
--- /dev/null
+++ b/src/makefile
@@ -0,0 +1,58 @@
+#
+# Makefile for the Free Software Foundations gcc compiler
+# Optimize flag = 1 to achieve correct timing
+#
+CC=gcc
+LINK=gcc
+#
+# LINUX FLAGS
+CFLAGS=-c -O1 -Wall -DLINUX
+LFLAGS=-s -o
+TARGET=sp12
+ERASE=rm -f
+OBJECTS=sp12.o init.o flash.o device.o buffer.o eeprom.o
+
+# DOS FLAGS
+#CFLAGS=-c -O1 -Wall
+#LFLAGS=-lemu -s -o
+#TARGET=sp12.exe
+#ERASE=del
+#OBJECTS=sp12.o init.o flash.o device.o buffer.o eeprom.o
+
+# Win FLAGS - MingW
+#CFLAGS=-c -O1 -Wall -mwindows -mconsole
+#LFLAGS=-s -o
+#TARGET=sp12.exe
+#ERASE=del
+#OBJECTS=sp12.o init.o flash.o device.o buffer.o eeprom.o winnt.o
+
+all: $(TARGET)
+
+sp12.o: sp12.c
+ $(CC) $(CFLAGS) sp12.c
+
+init.o: init.c
+ $(CC) $(CFLAGS) init.c
+
+flash.o: flash.c
+ $(CC) $(CFLAGS) flash.c
+
+device.o: device.c
+ $(CC) $(CFLAGS) device.c
+
+buffer.o: buffer.c
+ $(CC) $(CFLAGS) buffer.c
+
+eeprom.o: eeprom.c
+ $(CC) $(CFLAGS) eeprom.c
+
+winnt.o: winnt.c
+ $(CC) $(CFLAGS) winnt.c
+
+$(TARGET): makefile $(OBJECTS)
+ $(LINK) $(LFLAGS) $(TARGET) $(OBJECTS)
+
+clean:
+ $(ERASE) $(TARGET)
+ $(ERASE) *.o
+