summaryrefslogtreecommitdiff
path: root/Makefile
blob: ff728e6ccc680c7027bc903416d45a822c3911db (plain)
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
# See COPYING file for copyright, license and warranty details.

include config.mk

SRC = getgbook.c
OBJ = $(SRC:.c=.o)
BIN = $(SRC:.c=)

all: $(BIN)

$(OBJ): util.c

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

getgbook: $(OBJ)
	@echo LD $@
	@$(CC) -o $@ $(OBJ) $(LDFLAGS)

install: all
	cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin

uninstall:
	cd $(DESTDIR)$(PREFIX)/bin && rm -f $(BIN)

clean:
	rm -f -- $(BIN) $(OBJ)

.PHONY: all clean install uninstall