aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 5b589dfa48a93166e7732e54b88881d10ee5a7fc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
name 				:= halk
cc 				:= cc
flags 			:= -g
sources 			:= $(wildcard src/*.c)
sources 			:= $(filter-out src/parser.c, $(sources)) # exclude the incomplete parser for now.
objects 			:= $(sources:.c=.o)

$(name): $(objects)
	$(cc) $(objects) $(flags) -o ./$(name)

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

install:
	make
	cp ./$(name) $(XDG_DATA_HOME)/bin/$(name)

uninstall:
	rm -f $(XDG_DATA_HOME)/bin/$(name)

clean:
	rm -f ./$(name) ./src/*.o