summaryrefslogtreecommitdiff
path: root/Makefile
blob: 9d000ae64ee996c8e200d38e599a1dfd3a705d89 (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
31
32
33
34
35
SOURCES	= mtview
TARGETS	= mtview

TARG	= $(addprefix bin/,$(TARGETS))
TOBJ	= $(addprefix obj/,$(addsuffix .o,$(SOURCES)))

INCLUDE =
LIBS	= -lX11 -lutouch-grail -lmtdev

COMP	= gcc -O3 $(INCLUDE) -c $< -o $@
LINK	= gcc $< $(LIBS) -o $@

.PHONY: all man html clean mkobj
.PRECIOUS: obj/%.o

all:	$(TOBJ) $(TARG)

bin/%:	obj/%.o
	@mkdir -p $(@D)
	$(LINK)

obj/%.o: src/%.c
	@mkdir -p $(@D)
	$(COMP)

man:
	@rm -rf man
	doxygen etc/doxman

html:
	@rm -rf html
	doxygen etc/doxhtml

clean:
	rm -rf man html bin obj auto