aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 3bf834543146cd44a3c7df750596a29e83fff3dd (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
.POSIX:

CONFIGFILE = config.mk
include $(CONFIGFILE)

OBJ =\
	cg-base.o\
	radharc.o

HDR =\
	cg-base.h

all: radharc
$(OBJ): $(@:.o=.c) $(HDR)

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

radharc: $(OBJ)
	$(CC) -o $@ $(OBJ) $(LDFLAGS)

install: radharc
	mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
	cp radharc -- "$(DESTDIR)$(PREFIX)/bin"

uninstall:
	-rm -f -- "$(DESTDIR)$(PREFIX)/bin/radharc"

clean:
	-rm -f -- radharc *.o

.SUFFIXES:
.SUFFIXES: .c .o

.PHONY: all check install uninstall clean