1# ``Licensed under the Apache License, Version 2.0 (the "License"); 2# you may not use this file except in compliance with the License. 3# You may obtain a copy of the License at 4# 5# http://www.apache.org/licenses/LICENSE-2.0 6# 7# Unless required by applicable law or agreed to in writing, software 8# distributed under the License is distributed on an "AS IS" BASIS, 9# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10# See the License for the specific language governing permissions and 11# limitations under the License. 12# 13# The Initial Developer of the Original Code is Ericsson Utvecklings AB. 14# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings 15# AB. All Rights Reserved.'' 16# 17# $Id: Makefile,v 1.1 2008/12/17 09:53:33 mikpe Exp $ 18# 19include $(ERL_TOP)/make/target.mk 20include $(ERL_TOP)/make/$(TARGET)/otp.mk 21 22# ---------------------------------------------------- 23# Application version 24# ---------------------------------------------------- 25include ../vsn.mk 26 27VSN = $(INETS_VSN) 28APP_VSN = "inets-$(VSN)" 29 30 31# ---------------------------------------------------- 32# Release directory specification 33# ---------------------------------------------------- 34RELSYSDIR = $(RELEASE_PATH)/lib/inets-$(VSN) 35 36# ---------------------------------------------------- 37# Target Specs 38# ---------------------------------------------------- 39MODULES = \ 40 ftp \ 41 http \ 42 http_lib \ 43 httpc_handler \ 44 httpc_manager \ 45 uri \ 46 httpd \ 47 httpd_acceptor \ 48 httpd_acceptor_sup \ 49 httpd_conf \ 50 httpd_example \ 51 httpd_manager \ 52 httpd_misc_sup \ 53 httpd_parse \ 54 httpd_request_handler \ 55 httpd_response \ 56 httpd_socket \ 57 httpd_sup \ 58 httpd_util \ 59 httpd_verbosity \ 60 inets_sup \ 61 mod_actions \ 62 mod_alias \ 63 mod_auth \ 64 mod_auth_plain \ 65 mod_auth_dets \ 66 mod_auth_mnesia \ 67 mod_auth_server \ 68 mod_browser \ 69 mod_cgi \ 70 mod_dir \ 71 mod_disk_log \ 72 mod_esi \ 73 mod_get \ 74 mod_head \ 75 mod_htaccess \ 76 mod_include \ 77 mod_log \ 78 mod_range \ 79 mod_responsecontrol \ 80 mod_trace \ 81 mod_security \ 82 mod_security_server 83 84HRL_FILES = httpd.hrl httpd_verbosity.hrl mod_auth.hrl \ 85 http.hrl jnets_httpd.hrl 86 87ERL_FILES = $(MODULES:%=%.erl) 88 89TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR)) $(APP_TARGET) $(APPUP_TARGET) 90 91APP_FILE= inets.app 92APPUP_FILE= inets.appup 93 94APP_SRC= $(APP_FILE).src 95APP_TARGET= $(EBIN)/$(APP_FILE) 96 97APPUP_SRC= $(APPUP_FILE).src 98APPUP_TARGET= $(EBIN)/$(APPUP_FILE) 99 100# ---------------------------------------------------- 101# INETS FLAGS 102# ---------------------------------------------------- 103# DONT_USE_VERBOSITY = -Ddont_use_verbosity=true 104INETS_FLAGS = -D'SERVER_SOFTWARE="inets/$(VSN)"' \ 105 -Ddefault_verbosity=silence \ 106 $(DONT_USE_VERBOSITY) 107 108# INETS_DEBUG_DEFAULT = d 109ifeq ($(INETS_DEBUG),) 110 INETS_DEBUG = $(INETS_DEBUG_DEFAULT) 111endif 112 113ifeq ($(INETS_DEBUG),c) 114 INETS_FLAGS += -Dinets_cdebug -Dinets_debug -Dinets_log -Dinets_error 115endif 116ifeq ($(INETS_DEBUG),d) 117 INETS_FLAGS += -Dinets_debug -Dinets_log -Dinets_error 118endif 119ifeq ($(INETS_DEBUG),l) 120 INETS_FLAGS += -Dinets_log -Dinets_error 121endif 122ifeq ($(INETS_DEBUG),e) 123 INETS_FLAGS += -Dinets_error 124endif 125 126 127# ---------------------------------------------------- 128# FLAGS 129# ---------------------------------------------------- 130ERL_FLAGS += 131 132ifeq ($(WARN_UNUSED_WARS),true) 133ERL_COMPILE_FLAGS += +warn_unused_vars 134endif 135 136ERL_COMPILE_FLAGS += $(INETS_FLAGS) \ 137 +'{parse_transform,sys_pre_attributes}' \ 138 +'{attribute,insert,app_vsn,$(APP_VSN)}' 139 140 141# ---------------------------------------------------- 142# Targets 143# ---------------------------------------------------- 144 145debug opt: $(TARGET_FILES) 146 147clean: 148 rm -f $(TARGET_FILES) 149 rm -f core 150 151docs: 152 153# ---------------------------------------------------- 154# Special Build Targets 155# ---------------------------------------------------- 156 157$(APP_TARGET): $(APP_SRC) ../vsn.mk 158 sed -e 's;%VSN%;$(VSN);' $< > $@ 159 160$(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk 161 sed -e 's;%VSN%;$(VSN);' $< > $@ 162 163# ---------------------------------------------------- 164# Release Target 165# ---------------------------------------------------- 166include $(ERL_TOP)/make/otp_release_targets.mk 167 168release_spec: opt 169 $(INSTALL_DIR) $(RELSYSDIR)/src 170 $(INSTALL_DATA) $(HRL_FILES) $(ERL_FILES) $(RELSYSDIR)/src 171 $(INSTALL_DIR) $(RELSYSDIR)/ebin 172 $(INSTALL_DATA) $(TARGET_FILES) $(RELSYSDIR)/ebin 173 174release_docs_spec: 175 176info: 177 @echo "INETS_DEBUG = $(INETS_DEBUG)" 178 @echo "INETS_FLAGS = $(INETS_FLAGS)" 179 @echo "ERL_COMPILE_FLAGS = $(ERL_COMPILE_FLAGS)" 180