summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..4e8c506
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+CC := gcc
+
+PROGRAM = glibcrun
+CFLAGS = -O2 -std=c99 -Wall -W
+LDFLAGS =
+
+INSTALL = /usr/bin/env install
+PREFIX = /usr/local
+
+OBJS = glibcrun.o
+
+all: $(PROGRAM)
+
+$(PROGRAM): $(OBJS)
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+install: $(PROGRAM)
+ $(INSTALL) $(PROGRAM) $(PREFIX)/bin
+ chmod u+s $(PREFIX)/bin/${PROGRAM}
+
+clean:
+ rm -f $(OBJS) $(PROGRAM)
+
+%.o: %.c
+ $(CC) $(CFLAGS) -c $^ -I. -o $@
+
+.PHONY: all install clean distclean