summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..2646908
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,19 @@
+CFLAGS := -s -Wall -c -Os $(CFLAGS)
+LDFLAGS = -s -Wall
+
+
+CFLAGS += -ffunction-sections -fdata-sections
+LDFLAGS += --static -s -Wl,--gc-sections
+
+default: all
+all: rtkmib
+
+rtkmib: rtkmib.o
+ $(CC) $(LDFLAGS) -o rtkmib rtkmib.o
+
+rtkmib.o: rtkmib.c
+ $(CC) $(CFLAGS) -o rtkmib.o rtkmib.c
+
+clean:
+ rm -f *.o
+ rm -f rtkmib