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

                      

 
        
                  
 




                                               
 
            


                                                
                                                       
 
          
                                            
                                                  
 
      



                               
 
                                   
.POSIX:

CONFIGFILE = config.mk
include $(CONFIGFILE)


all: gpp
gpp.o: gpp.c arg.h

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

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

install: gpp
	mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
	mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man"
	cp -- gpp "$(DESTDIR)$(PREFIX)/bin/gpp"
	cp -- gpp.1 "$(DESTDIR)$(MANPREFIX)/man1/gpp.1"

uninstall:
	-rm -- "$(DESTDIR)$(PREFIX)/bin/gpp"
	-rm -- "$(DESTDIR)$(MANPREFIX)/man1/gpp.1"

clean:
	-rm -rf -- gpp *.o *.su

.SUFFIXES:
.SUFFIXES: .o .c

.PHONY: all install uninstall clean