summarylogtreecommitdiffstats
path: root/Makefile
blob: 5fe913353f72da6886e971790b9873a611c2c06f (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
36
37
38
39
PROJECT = aesthe
USR_PATH = $(PKGDIR)/usr
INSTALL_OPTS = -o root -g root -v
INSTALL_OPTS_2 = $(INSTALL_OPTS_BIN) -m 644

all:
	cd src; make all

clean:
	cd src; make clean

run:
	cd src; make run

runexamples:
	cd src; make runexamples

install: all uninstall
	install -d $(USR_PATH)/bin
	install -d $(USR_PATH)/share
	install $(INSTALL_OPTS) -d $(USR_PATH)/share/$(PROJECT)
	install $(INSTALL_OPTS) -d $(USR_PATH)/share/$(PROJECT)/image
	install $(INSTALL_OPTS) -d $(USR_PATH)/share/$(PROJECT)/image/example
	install $(INSTALL_OPTS) -d $(USR_PATH)/share/$(PROJECT)/model
	install $(INSTALL_OPTS) -d $(USR_PATH)/share/$(PROJECT)/model/example
	install $(INSTALL_OPTS) -d $(USR_PATH)/share/$(PROJECT)/script
	install $(INSTALL_OPTS) -d $(USR_PATH)/share/$(PROJECT)/script/example
	install $(INSTALL_OPTS) bin/aesthe $(USR_PATH)/bin
	install $(INSTALL_OPTS_2) image/*.ppm $(USR_PATH)/share/$(PROJECT)/image
	install $(INSTALL_OPTS_2) image/example/*.ppm $(USR_PATH)/share/$(PROJECT)/image/example
	install $(INSTALL_OPTS_2) model/example/*.aexi $(USR_PATH)/share/$(PROJECT)/model/example
	install $(INSTALL_OPTS_2) script/*.lua $(USR_PATH)/share/$(PROJECT)/script
	install $(INSTALL_OPTS_2) script/example/*.lua $(USR_PATH)/share/$(PROJECT)/script/example

uninstall:
	rm -f $(USR_PATH)/bin/aesthe
	rm -rf $(USR_PATH)/share/$(PROJECT)