diff options
| author | Mattias Andrée <maandree@kth.se> | 2024-02-24 17:34:31 +0100 | 
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2024-02-24 17:34:31 +0100 | 
| commit | 275fc799ed112b0d41ccaa872e3da87328ad21c1 (patch) | |
| tree | 6f51f0b11490d668a3e30fbf1c9ff0adf0c476ff /Makefile | |
| download | coreupdown-275fc799ed112b0d41ccaa872e3da87328ad21c1.tar.gz coreupdown-275fc799ed112b0d41ccaa872e3da87328ad21c1.tar.bz2 coreupdown-275fc799ed112b0d41ccaa872e3da87328ad21c1.tar.xz  | |
First commit
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
| -rw-r--r-- | Makefile | 46 | 
1 files changed, 46 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f0d383d --- /dev/null +++ b/Makefile @@ -0,0 +1,46 @@ +.POSIX: + +CONFIGFILE = config.mk +include $(CONFIGFILE) + +OBJ =\ +	coreupdown.o + +HDR = + +all: coreupdown +$(OBJ): $(HDR) + +.c.o: +	$(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) + +coreupdown: $(OBJ) +	$(CC) -o $@ $(OBJ) $(LDFLAGS) + +install: coreupdown +	mkdir -p -- "$(DESTDIR)$(PREFIX)/bin" +	mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1" +	test -f "$(DESTDIR)$(PREFIX)/bin/coreup" || test ! -e "$(DESTDIR)$(PREFIX)/bin/coreup" +	test -f "$(DESTDIR)$(PREFIX)/bin/coredown" || test ! -e "$(DESTDIR)$(PREFIX)/bin/coredown" +	cp -- coreupdown "$(DESTDIR)$(PREFIX)/bin/coreup" +	ln -sf coreup "$(DESTDIR)$(PREFIX)/bin/coredown" +	cp -- coreup.1 coredown.1 "$(DESTDIR)$(MANPREFIX)/man1" + +postinstall: +	chown '0:0' "$(DESTDIR)$(PREFIX)/bin/coreup" +	chmod '4755' "$(DESTDIR)$(PREFIX)/bin/coreup" + +uninstall: +	-rm -f -- "$(DESTDIR)$(PREFIX)/bin/coreup" +	-rm -f -- "$(DESTDIR)$(PREFIX)/bin/coredown" +	-rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/coreup.1" +	-rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/coredown.1" + +clean: +	-rm -f -- *.o *.a *.lo *.su *.so *.so.* *.gch *.gcov *.gcno *.gcda +	-rm -f -- coreupdown + +.SUFFIXES: +.SUFFIXES: .o .c + +.PHONY: all install uninstall clean  | 
