Skip to content
Newer
Older
100644 98 lines (66 sloc) 1.5 KB
d7ebc3c @KirinDave Initial commit.
KirinDave authored Jul 10, 2007
1 ###-*-makefile-*- ; force emacs to enter makefile-mode
2
3
4 PREFIX = @prefix@
5 prefix = ${PREFIX}
6 ETCDIR = @sysconfdir@
7 VARDIR = @localstatedir@
8
9 ifeq ($(DESTDIR),)
10 DESTDIR=/
11 endif
12
13 ## DESTDIR is handled separately in the individual Makefiles
14
15 ERL=@ERL@
16 WERL=@WERL@
17 ERLC=@ERLC@
18 EMULATOR=beam
19 DEFAULT_CHARSET=@DEFAULT_CHARSET@
20 EPAM = @EPAM@
21 EXTRAINCLUDE = @EXTRAINCLUDE@
22 ERLBINDIR = @ERLBINDIR@
23
24
25 ifdef debug
26 ERLC_FLAGS+=-Ddebug
27 endif
28
29 ifdef trace
30 ERLC_FLAGS=+trace
31 endif
32
33 ifdef export_all
34 ERLC_FLAGS+=-Dexport_all
35 endif
36
37 ifdef debug_info
38 ERLC_FLAGS+=+debug_info
39 endif
40
41 CC=@CC@
42 CFLAGS=@CFLAGS@
43 LINKER=@LINKER@
44 LDFLAGS=@LDFLAGS@
45 WIN32=@WIN32@
46 BSDI=@BSDI@
47 EXE=@EXE@
48 DLL=@DLL@
49 OBJ=@OBJ@
50 OUT=@OUT@
51 FPIC=@FPIC@
52 LIBS=@LIBS@
53
54
55
56 ERLDIR=@ERLDIR@
57
58 LD_SHARED=@LD_SHARED@
59
60 INSTALL=@INSTALL@
61 INSTALL_DATA=@INSTALL_DATA@
62
63
64
65 EMULATOR=beam
66 ifdef debug
67 ERLC_FLAGS+=-Ddebug
68 endif
69
70 ifdef trace
71 ERLC_FLAGS=+trace
72 endif
73
74 ifdef export_all
75 ERLC_FLAGS+=-Dexport_all
76 endif
77
78
79 # Hmm, don't know if you are supposed to like this better... ;-)
80 APPSCRIPT = '$$vsn=shift; $$mods=""; while(@ARGV){ $$_=shift; s/^([A-Z].*)$$/\'\''$$1\'\''/; $$mods.=", " if $$mods; $$mods .= $$_; } while(<>) { s/%VSN%/$$vsn/; s/%MODULES%/$$mods/; print; }'
81
82 # Targets
83
84 ../ebin/%.app: %.app.src ../vsn.mk Makefile
85 perl -e $(APPSCRIPT) "$(VSN)" $(MODULES) < $< > $@
86
87 ../ebin/%.appup: %.appup
88 cp $< $@
89
90 ../ebin/%.$(EMULATOR): %.erl
91 "$(ERLC)" $(ERLC_FLAGS) -o ../ebin $<
92
93 %.$(EMULATOR): %.erl
94 "$(ERLC)" $(ERLC_FLAGS) $<
95
96
97
Something went wrong with that request. Please try again.