-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.gnu
60 lines (44 loc) · 1.51 KB
/
Makefile.gnu
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Makefile for building and installing creolehtml
# Assumes a working euphoria installation
CONFIG_FILE = config.gnu
ifndef CONFIG
CONFIG = $(CONFIG_FILE)
endif
include $(CONFIG_FILE)
INCLUDE_SOURCE= \
$(wildcard *.e)
ifeq "$(PREFIX)" ""
PREFIX=/usr/local
endif
all : build/creole
# A rule like this example below only makes the targets that go inside of it
# always run. When build/main-.c is created the timestamp of build is updated.
# So, build cannot be a prerequisite of anything inside build. :(
#
# build :
# mkdir build
build/main-.c : creole.ex $(INCLUDE_SOURCE)
-mkdir build
cd build && euc -gcc -con -makefile ../creole.ex
build/creole.mak : build/main-.c
build/creole : build/main-.c build/creole.mak
$(MAKE) -C build -f creole.mak
install : build/creole
install build/creole $(DESTDIR)$(PREFIX)/bin
-mkdir -p $(DESTDIR)$(PREFIX)/share/euphoria/creole
install -p *.e $(DESTDIR)$(PREFIX)/share/euphoria/creole
uninstall :
-rm $(DESTDIR)$(PREFIX)/bin/creole
-rm -rf $(DESTDIR)$(PREFIX)/share/euphoria/creole
# remove intermediate files without marking things as out of date.
# make will report "nothing to be done" unless sources are changed.
mostlyclean :
-rm -f build/*.{o,obj,c,mak} build/main-.h build/creole.lnk
clean :
-rm -rf build
distclean : clean
rm Makefile $(CONFIG_FILE)
.PHONY : all clean install uninstall disclean mostlyclean
# Allows you to remove the intermediate C files without unecessarily
# remaking them the next time you run make.
.SECONDARY : build/main-.c build/creole.mak