-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinclude.mk.in
More file actions
38 lines (30 loc) · 810 Bytes
/
include.mk.in
File metadata and controls
38 lines (30 loc) · 810 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
# This is a -*-makefile-*-
# Copyright 2015 Hakan Mattsson
#
# See the file "LICENSE" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
ifeq ($(DESTDIR),)
DESTDIR=@prefix@
endif
USE_DEFAULT_ETCDIR=@use_default_sysconfdir@
ifeq ($(ETCDIR),)
ifeq ($(USE_DEFAULT_ETCDIR),true)
ETCDIR=$(DESTDIR)/priv
else
ETCDIR=@sysconfdir@
endif
endif
# Erlang
ERL="@ERL@"
ERLC="@ERLC@"
EMULATOR=beam
ERLC_FLAGS += +warnings_as_errors +warn_unused_vars +debug_info
# Targets
../ebin/%.app: %.app.src ../vsn.mk Makefile
sed -e "s/%VSN%/$(VSN)/g" < $< > $@
../ebin/%.appup: %.appup.src ../vsn.mk Makefile
sed -e "s/%VSN%/$(VSN)/g" < $< > $@
../ebin/%.$(EMULATOR): %.erl
$(ERLC) $(ERLC_FLAGS) -o ../ebin $<
%.$(EMULATOR): %.erl
$(ERLC) $(ERLC_FLAGS) $<