aboutsummaryrefslogblamecommitdiffstats
path: root/Makefile
blob: 0f5e821f668fcac085179244f41cf5e1717c911f (plain) (tree)
1
2
3
4
5
6
7
8
9
       
 

                      
 
           
 

                                 
 

                                            

                   





                                                                  

          


                                                              

      




                                         
.POSIX:

CONFIGFILE = config.mk
include $(CONFIGFILE)

all: pdeath

.o:
	$(CC) -o $@ $^ $(LDFLAGS)

.c.o:
	$(CC) -o $@ $< $(CPPFLAGS) $(CFLAGS)

install: bin/pdeath
	mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
	mkdir -p -- "$(DESTDIR)$(PREFIX)/share/licenses/pdeath"
	mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1"
	cp -- pdeath "$(DESTDIR)$(PREFIX)/bin/"
	cp -- LICENSE "$(DESTDIR)$(PREFIX)/share/licenses/pdeath/"
	cp -- pdeath.1 "$(DESTDIR)$(MANPREFIX)/man1/"

uninstall:
	-rm -f -- "$(DESTDIR)$(PREFIX)/bin/pdeath"
	-rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/pdeath.1"
	-rm -rf -- "$(DESTDIR)$(PREFIX)/share/licenses/pdeath"

clean:
	-rm -f -- *.o pdeath

SUFFIXES: .o .c.o

.PHONY: all check install uninstall clean