diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2020-11-29 03:42:28 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2020-11-29 03:42:28 +0300 |
commit | 4b7af666f2abdf5e3cc76e21b11273deccaec169 (patch) | |
tree | 860c20bafc18ccbb2e4bdc1bbe8c1540bfbd7634 /Makefile |
initial
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 27 |
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 |