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 c_client_erl_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
96
oe_code_m_strRec_str5.c \
97
oe_code_m_strRec_str7.c
112
C_FILES = $(GEN_C_FILES) c_client.c my.c
114
OBJS = $(C_FILES:.c=@obj@)
118
ERL_FILES = $(GEN_ERL_FILES) m_i_impl.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): c_erl_test.idl
135
$(ERLC) -I $(IC_INCLUDE_PATH) "+{be,c_client}" \
136
"+{user_protocol,my}" "+{c_timeout,{5000,5000}}" c_erl_test.idl
138
$(GEN_ERL_FILES) $(GEN_HRL_FILES): c_erl_test.idl
139
$(ERLC) -I $(IC_INCLUDE_PATH) "+{be,erl_genserv}" c_erl_test.idl
142
$(CC) -c -o $*@obj@ $(CFLAGS) $<
145
$(ERLC) -I $(IC_INCLUDE_PATH) $<