aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 2bff89619eeb1d94c073fc1a2461429ec1ffe1cb (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
33
34
35
36
37
38
39
40
41
42
43
44
45
.POSIX:

CONFIGFILE = config.mk
include $(CONFIGFILE)

OBJ =\
	braces.o

HDR =\
	arg.h


ALL_CPPFLAGS = $(CPPFLAGS) $(FUZZED_CPPFLAGS)
ALL_CFLAGS   = $(CFLAGS)   $(FUZZED_CFLAGS)
ALL_LDFLAGS  = $(LDFLAGS)  $(FUZZED_LDFLAGS)


all: braces
$(OBJ): $(HDR)

.c.o:
	$(CC) -c -o $@ $< $(ALL_CFLAGS) $(GOV_CFLAGS) $(ALL_CPPFLAGS) $(GOV_CPPFLAGS)

braces: $(OBJ)
	$(CC) -o $@ $(OBJ) $(ALL_LDFLAGS) $(COV_LDFLAGS)

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

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

clean:
	-rm -f -- *.o *.a *.lo *.su *.so *.so.* *.gch
	-rm -f -- *.gcov *.gcno *.gcda *.t *.to *.f *.fo
	-rm -f -- braces

.SUFFIXES:
.SUFFIXES: .o .c

.PHONY: all install uninstall clean