4
# Copyright Ericsson AB 2004-2011. All Rights Reserved.
6
# The contents of this file are subject to the Erlang Public License,
7
# Version 1.1, (the "License"); you may not use this file except in
8
# compliance with the License. You should have received a copy of the
9
# Erlang Public License along with this software. If not, it can be
10
# retrieved online at http://www.erlang.org/.
12
# Software distributed under the License is distributed on an "AS IS"
13
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
# the License for the specific language governing rights and limitations
20
# Makefile.src for erl_client_c_server test
21
# Note: This file *must* work for both Unix and Windows
23
# We use both `rm' (Unix) and `del' (Windows) for removing files, but
24
# with a `-' in front so that the error in not finding `rm' (`del') on
25
# Windows (Unix) is ignored.
31
.SUFFIXES: .c .h .erl .idl @obj@ .@EMULATOR@
37
ERL_INCLUDE = @erl_include@
39
IC_INCLUDE_PATH = @ic_include_path@
40
IC_LIB = @ic_libpath@@DS@@ic_lib@
42
ERL_INTERFACE_INCLUDE = @erl_interface_include@
43
ERL_INTERFACE_LIB = @erl_interface_libpath@@DS@@erl_interface_lib@
44
ERL_INTERFACE_EILIB = @erl_interface_libpath@@DS@@erl_interface_eilib@
45
ERL_INTERFACE_THREADLIB = @erl_interface_threadlib@
46
ERL_INTERFACE_SOCK_LIBS = @erl_interface_sock_libs@
49
## XXX Should set warning flag with a DEBUG_FLAG
50
CFLAGS = @CFLAGS@ @DEFS@ -I$(ERL_INCLUDE) \
51
-I$(IC_INCLUDE_PATH) -I$(ERL_INTERFACE_INCLUDE)
54
LDFLAGS = @CROSSLDFLAGS@
55
LIBS = $(IC_LIB) $(ERL_INTERFACE_LIB) $(ERL_INTERFACE_EILIB) \
56
$(ERL_INTERFACE_THREADLIB) @LIBS@ $(ERL_INTERFACE_SOCK_LIBS)
59
# Generated C header files
95
oe_code_m_strRec_str5.c \
96
oe_code_m_strRec_str7.c \
112
C_FILES = $(GEN_C_FILES) c_server.c callbacks.c
114
OBJS = $(C_FILES:.c=@obj@)
118
ERL_FILES = $(GEN_ERL_FILES) erl_client.erl
120
EBINS = $(ERL_FILES:.erl=.@EMULATOR@)
123
all: $(PGMS) $(EBINS)
126
-rm -f $(OBJS) $(GEN_C_FILES) $(GEN_H_FILES) $(PGMS) \
127
$(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES)
128
-del /F /Q $(OBJS) $(GEN_C_FILES) $(GEN_H_FILES) $(PGMS) \
129
$(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES)
132
$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
134
$(GEN_C_FILES) $(GEN_H_FILES): erl_c_test.idl
135
$(ERLC) -I $(IC_INCLUDE_PATH) "+{be,c_server}" \
136
"+{scoped_op_calls,true}" erl_c_test.idl
138
# If we have scoped operation calls for C, we must have that for
139
# Erlang as well, if we use the m_i.erl file for calling the server.
141
$(GEN_ERL_FILES) $(GEN_HRL_FILES): erl_c_test.idl
142
$(ERLC) -I $(IC_INCLUDE_PATH) "+{be,erl_genserv}" \
143
"+{scoped_op_calls,true}" "+{timeout,true}" erl_c_test.idl
146
$(CC) -c -o $*@obj@ $(CFLAGS) $<
149
$(ERLC) -W -I $(IC_INCLUDE_PATH) $<