aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 6628a8b56f8cacde96241759f294625d7c8fcd31 (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
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) $(HOME)/.local/bin/$(name)

uninstall:
	rm -f $(HOME)/.local/bin/$(name)

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

me:
	@[ "$(USER)" = "root" ] && echo "Okay." || echo "What? Make it yourself."

a sandwich:
	@exit

.PHONY: install uninstall clean me a sandwich