-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (30 loc) · 818 Bytes
/
Makefile
File metadata and controls
39 lines (30 loc) · 818 Bytes
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
36
37
38
39
PREFIX ?= /usr
BINDIR := $(PREFIX)/bin
DATADIR := $(PREFIX)/share/lmao
EXAMPLES := \
example_simple_cat.hell \
example_simple_hello_world.hell \
example_hello_world.hell \
example_cat_halt_on_eof.hell \
example_digital_root.hell \
example_adder.hell
.PHONY: all lmao doc install uninstall clean
all: lmao
lmao: bin/lmao
cp bin/lmao .
bin/lmao: src/*.c src/*.h src/lmao.y src/lmao.l
$(MAKE) -C src/
doc: Doxyfile src/*.c src/*.h
doxygen Doxyfile
install: lmao
install -Dm755 ./lmao $(DESTDIR)$(BINDIR)/lmao
$(foreach f,$(EXAMPLES), \
install -Dm644 ./$(f) $(DESTDIR)$(DATADIR)/$(f);)
uninstall:
rm -f $(DESTDIR)$(BINDIR)/lmao
$(foreach f,$(EXAMPLES), rm -f $(DESTDIR)$(DATADIR)/$(f);)
-rmdir $(DESTDIR)$(DATADIR)
clean:
$(MAKE) -C src/ clean
rm -f ./lmao
rm -rf doc/