summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorRoman Yeryomin <roman@advem.lv>2014-02-25 00:08:54 +0200
committerRoman Yeryomin <roman@advem.lv>2014-02-25 00:08:54 +0200
commit8e48a7e9d50221ed75974ce8537d25e96d52ec8d (patch)
treef1f0026d8060a762cbe5c1857ea5bbed86260e19 /Makefile
Initial commit
Signed-off-by: Roman Yeryomin <roman@advem.lv>
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