From 5635aa0fe22734cd4330eb4aa330b60d2e1b109f Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 27 Feb 2021 13:13:55 +0100 Subject: Remove -e flag, remove long options, start rewriting in C, add support for changing shell MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f841829..dae30f0 100644 --- a/Makefile +++ b/Makefile @@ -1,31 +1,32 @@ -VERSION = 1.5 +.POSIX: -PREFIX = /usr -MANPREFIX = $(PREFIX)/share/man - -PKGNAME = gpp -COMMAND = gpp - -PY = python -SHEBANG = /usr/bin/env $(PY) +CONFIGFILE = config.mk +include $(CONFIGFILE) all: gpp +gpp.o: gpp.c arg.h -gpp: gpp.py - env SHEBANG='$(SHEBANG)' $(PY) gpp.py < gpp.py > $@ +gpp: gpp.o + $(CC) -o $@ gpp.o $(LDFLAGS) + +.c.o: + $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) install: gpp install -dm755 -- "$(DESTDIR)$(PREFIX)/bin" - install -m755 -- gpp "$(DESTDIR)$(PREFIX)/bin/$(COMMAND)" + install -m755 -- gpp "$(DESTDIR)$(PREFIX)/bin/gpp" install -dm755 -- "$(DESTDIR)$(MANPREFIX)/man" - install -m644 -- gpp.1 "$(DESTDIR)$(MANPREFIX)/man/$(COMMAND).1" + install -m644 -- gpp.1 "$(DESTDIR)$(MANPREFIX)/man/gpp.1" uninstall: - -rm -- "$(DESTDIR)$(PREFIX)/bin/$(COMMAND)" - -rm -- "$(DESTDIR)$(MANPREFIX)/man/$(COMMAND).1" + -rm -- "$(DESTDIR)$(PREFIX)/bin/gpp" + -rm -- "$(DESTDIR)$(MANPREFIX)/man/gpp.1" clean: - -rm -rf -- gpp bin obj + -rm -rf -- gpp *.o *.su + +.SUFFIXES: +.SUFFIXES: .o .c .PHONY: all install uninstall clean -- cgit v1.2.3-70-g09d2