aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 42b6fdbc608f0a9f34aa1164d717a4dacd5694bc (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
binname 			:= halk
exec 				:= $(binname).out

compiler 		:= clang
flags 			:= -g

sources 			:= $(wildcard src/*.c)
sources 			:= $(filter-out src/parser.c, $(sources)) # exclude the incomplete parser for now.
objects 			:= $(sources:.c=.o)


$(exec): $(objects)
	$(compiler) $(objects) $(flags) -o $(exec)

%.o: %.c include/%.h
	$(compiler) -c $(flags) $< -o $@

install:
	make
	cp ./$(exec) /usr/local/bin/$(binname)

uninstall:
	rm -f /usr/local/bin/$(binname) 

clean:
	rm -f *.out *.o src/*.o