summaryrefslogtreecommitdiff
path: root/Makefile
blob: 8c17af649964a93dd3f5431a2609e7bec5351b74 (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
RM := rm -f

CFLAGS = \
	-D_FORTIFY_SOURCE=2    \
	-D_GNU_SOURCE          \
	-Iinclude              \
	-O3                    \
	-Wall                  \
	-Wextra                \
	-Wmissing-declarations \
	-Wpedantic             \
	-g                     \
	-o$(@)                 \
	-std=c99

OBJS := \
	src/chkpar.o \
	src/exi.o    \
	src/getsum.o \
	src/hlp.o    \
	src/inidat.o \
	src/main.o   \
	src/opn.o    \
	src/pat.o    \
	src/red.o

BIN := agbsum

$(BIN): $(OBJS)
	$(CC) -o$(BIN) $(OBJS)

.PHONY: clean install purge

clean:
	$(RM) $(OBJS)

purge: clean
	$(RM) $(BIN)

install: $(BIN)
	mkdir -pm755 "$(BINDIR)"
	install -m755 "agbsum" "$(BINDIR)"