blob: d5277eb2565529e33389995e8ab70161f394cab3 (
plain) (
blame)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
#
# %CopyrightBegin%
#
# Copyright Ericsson AB 2001-2011. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
#
# %CopyrightEnd%
#
#
# Makefile.src for c_client_erl_server test
# Note: This file *must* work for both Unix and Windows
#
# We use both `rm' (Unix) and `del' (Windows) for removing files, but
# with a `-' in front so that the error in not finding `rm' (`del') on
# Windows (Unix) is ignored.
#
# VxWorks? XXX
#
.SUFFIXES:
.SUFFIXES: .c .h .erl .idl @obj@ .@EMULATOR@
# Variables from ts:
#
ERL_INCLUDE = @erl_include@
IC_INCLUDE_PATH = @ic_include_path@
IC_LIB = @ic_libpath@@DS@@ic_lib@
ERL_INTERFACE_INCLUDE = @erl_interface_include@
ERL_INTERFACE_LIB = @erl_interface_libpath@@DS@@erl_interface_lib@
ERL_INTERFACE_EILIB = @erl_interface_libpath@@DS@@erl_interface_eilib@
ERL_INTERFACE_THREADLIB = @erl_interface_threadlib@
ERL_INTERFACE_SOCK_LIBS = @erl_interface_sock_libs@
CC = @CC@
## XXX Should set warning flag with a DEBUG_FLAG
CFLAGS = @CFLAGS@ @DEFS@ -I@erl_include@ \
-I@ic_include_path@ -I@erl_interface_include@
LD = @LD@
LDFLAGS = @CROSSLDFLAGS@
LIBS = $(IC_LIB) $(ERL_INTERFACE_LIB) $(ERL_INTERFACE_EILIB) \
$(ERL_INTERFACE_THREADLIB) @LIBS@ $(ERL_INTERFACE_SOCK_LIBS)
ERLC = erlc
# Generated C header files
GEN_H_FILES = \
m.h \
m_i.h \
oe_c_erl_test.h
# Generated C files
GEN_C_FILES = \
m.c \
m_i.c \
oe_c_erl_test.c \
oe_code_m_a.c \
oe_code_m_arr1.c \
oe_code_m_arr2.c \
oe_code_m_arr3.c \
oe_code_m_aseq.c \
oe_code_m_b.c \
oe_code_m_bseq.c \
oe_code_m_dd.c \
oe_code_m_dyn.c \
oe_code_m_dyn_sl.c \
oe_code_m_es.c \
oe_code_m_et.c \
oe_code_m_etseq.c \
oe_code_m_fruit.c \
oe_code_m_lseq.c \
oe_code_m_s.c \
oe_code_m_s_sl.c \
oe_code_m_sarr3.c \
oe_code_m_simple.c \
oe_code_m_ssarr3.c \
oe_code_m_sseq.c \
oe_code_m_ssstr3.c \
oe_code_m_sstr3.c \
oe_code_m_str1.c \
oe_code_m_str3.c \
oe_code_m_strRec.c \
oe_code_m_strRec_str5.c \
oe_code_m_strRec_str7.c
GEN_HRL_FILES = \
m.hrl \
m_i.hrl \
oe_c_erl_test.hrl
GEN_ERL_FILES = \
m.erl \
m_arr2.erl \
m_arr3.erl \
m_i.erl \
m_str3.erl \
oe_c_erl_test.erl
C_FILES = $(GEN_C_FILES) c_client.c
OBJS = $(C_FILES:.c=@obj@)
PGMS = c_client@exe@
ERL_FILES = $(GEN_ERL_FILES) m_i_impl.erl
EBINS = $(ERL_FILES:.erl=.@EMULATOR@)
all: $(PGMS) $(EBINS)
clean:
-rm -f $(OBJS) $(GEN_C_FILES) $(GEN_H_FILES) $(PGMS) \
$(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES)
-del /F /Q $(OBJS) $(GEN_C_FILES) $(GEN_H_FILES) $(PGMS) \
$(EBINS) $(GEN_ERL_FILES) $(GEN_HRL_FILES)
$(PGMS): $(OBJS)
$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
$(GEN_C_FILES) $(GEN_H_FILES): c_erl_test.idl
$(ERLC) -I $(IC_INCLUDE_PATH) "+{be,c_client}" c_erl_test.idl
$(GEN_ERL_FILES) $(GEN_HRL_FILES): c_erl_test.idl
$(ERLC) -I $(IC_INCLUDE_PATH) "+{be,erl_genserv}" c_erl_test.idl
.c@obj@:
$(CC) -c -o $*@obj@ $(CFLAGS) $<
.erl.@EMULATOR@:
$(ERLC) -I $(IC_INCLUDE_PATH) $<
|