1 # $Id: Makefile,v 1.3 2004/08/13 16:35:59 mlogan Exp $
3 include ..
/..
/..
/build
/otp.mk
4 include ..
/..
/..
/build
/colors.mk
5 include ..
/..
/..
/build
/buildtargets.mk
7 # ----------------------------------------------------
9 # ----------------------------------------------------
14 VSN
=$(%%APP_NAME_UPPER_CASE
%%_VSN
)
16 # ----------------------------------------------------
17 # Install directory specification
18 # WARNING: INSTALL_DIR the command to install a directory.
19 # INSTALL_DST is the target directory
20 # ----------------------------------------------------
21 INSTALL_DST
= $(ERLANG_OTP
)/lib
/$(APP_NAME
)-$(VSN
)
23 # ----------------------------------------------------
25 # ----------------------------------------------------
28 MODULES
= $(shell ls
*.erl | sed s
/.erl
//)
29 MODULES_COMMA
= $(shell ls
*.erl | sed s
/\\.erl
/,/)
32 INTERNAL_HRL_FILES
= $(APP_NAME
).hrl
33 ERL_FILES
= $(MODULES
:%=%.erl
)
34 DOC_FILES
=$(ERL_FILES
)
36 APP_FILE
= $(APP_NAME
).app
37 APPUP_FILE
= $(APP_NAME
).appup
39 APP_SRC
= $(APP_FILE
).src
40 APPUP_SRC
= $(APPUP_FILE
).src
42 APP_TARGET
= $(EBIN
)/$(APP_FILE
)
43 APPUP_TARGET
= $(EBIN
)/$(APPUP_FILE
)
45 BEAMS
= $(MODULES
:%=$(EBIN
)/%.
$(EMULATOR
))
46 TARGET_FILES
= $(BEAMS
) $(APP_TARGET
) $(APPUP_TARGET
)
48 WEB_TARGET
=/var
/yaws
/www
/$(APP_NAME
)
50 # ----------------------------------------------------
52 # ----------------------------------------------------
55 ERL_COMPILE_FLAGS
+= -I..
/include -I..
/..
/fslib
/include -I..
/..
/system_status
/include
57 # ----------------------------------------------------
59 # ----------------------------------------------------
61 all debug opt
: $(EBIN
) $(TARGET_FILES
)
63 #$(EBIN)/rm_logger.beam: $(APP_NAME).hrl
64 include ..
/..
/..
/build
/docs.mk
66 # Note: In the open-source build clean must not destroy the preloaded
77 # ----------------------------------------------------
78 # Special Build Targets
79 # ----------------------------------------------------
81 $(APP_TARGET
): $(APP_SRC
) ..
/vsn.mk
$(BEAMS
)
82 sed
-e
's;%VSN%;$(VSN);' \
83 -e
's;%PFX%;$(PFX);' \
84 -e
's;%APP_NAME%;$(APP_NAME);' \
85 -e
's;%MODULES%;%MODULES%$(MODULES_COMMA);' \
87 sed
-e
's/%MODULES%\(.*\),/\1/' \
92 $(APPUP_TARGET
): $(APPUP_SRC
) ..
/vsn.mk
93 sed
-e
's;%VSN%;$(VSN);' $< > $@
95 $(WEB_TARGET
): ..
/markup
/*
98 cp
-r ..
/markup
/ $(WEB_TARGET
)
99 cp
-r ..
/skins
/ $(WEB_TARGET
)
101 # ----------------------------------------------------
103 # ----------------------------------------------------
105 install: all $(WEB_TARGET
)
106 # $(INSTALL_DIR) $(INSTALL_DST)/src
107 # $(INSTALL_DATA) $(ERL_FILES) $(INSTALL_DST)/src
108 # $(INSTALL_DATA) $(INTERNAL_HRL_FILES) $(INSTALL_DST)/src
109 # $(INSTALL_DIR) $(INSTALL_DST)/include
110 # $(INSTALL_DATA) $(HRL_FILES) $(INSTALL_DST)/include
111 # $(INSTALL_DIR) $(INSTALL_DST)/ebin
112 # $(INSTALL_DATA) $(TARGET_FILES) $(INSTALL_DST)/ebin