aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: dae30f0fb5724d9c1c39b39f1416aeac58e91425 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.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
	install -dm755 -- "$(DESTDIR)$(PREFIX)/bin"
	install -m755 -- gpp "$(DESTDIR)$(PREFIX)/bin/gpp"
	install -dm755 -- "$(DESTDIR)$(MANPREFIX)/man"
	install -m644 -- gpp.1 "$(DESTDIR)$(MANPREFIX)/man/gpp.1"

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

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

.SUFFIXES:
.SUFFIXES: .o .c

.PHONY: all install uninstall clean