summaryrefslogtreecommitdiffstats
path: root/data/mnet/GP10/Host/Http/src/Makefile
blob: 85a12945a10324107b4b14189763fa1ddd8b0859 (plain)
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
#
#
# VxWorks Makefile for WebControl, JavaControl, and 
# WebControl/JavaControl.  This Makefile relies on pattern 
# matching to match source and object files.  For a more 
# explict Makefile that specifies all source and target file 
# matching, please see the pSOS Makefile. 
#
# NOTE:The default target is a combined 
# WebControl/JavaControl archive file called open.a.
# Link this archive into the device source code to enable all
# of the RLI APIs.  If using just JavaControl or WebControl
# APIs, specify 'make java' or 'make http' to create just 
# JavaControl or WebControl archives called java.a or http.a.
#

#
# VxWorks specific variables:
# NOTE:  These may differ depending on your system.  Change
# the settings below as necessary.
#
.KEEP_STATE:

ADDED_CFLAGS = -g -DROOT_TRACE -DFM_TRACE -DDbgM15_TRACE -DRW_MULTI_THREAD -D_REENTRANT -D__PROTOTYPE_5_0 -D__ENABLE_MEMMGR_DEBUG__ $(EXTRA)

#
# Rapid Logic source directories:
# NOTE: If you are using a flat directory just change all 
# directories below to that directory name.
#
#
# Default include directories:
# NOTE: options.h must be generated by the tool and included in the
# project.  We assume options.h is located in ./include.  If options.h
# is located elsewhere, include its location in the include path.
#

##########################################################
#
#  (c) Copyright Cisco 2000
#  All Rights Reserved
#
##########################################################

# TOP_OF_VOB must be defined before including l3defs.mk
TOP_OF_VOB = ..\..\..

MY_OUTPUT = $(OBJDIR)\http.out
OBJ_DIR   = ../bin

include $(TOP_OF_VOB)\l3defs.mk

RLIDIR = $(TOP_OF_VOB)/../THIRD_PARTY/rapidlogic
RLIMCC = $(TOP_OF_VOB)/../THIRD_PARTY/OamTools/RLI/wcit/tools/snmp/mibcomp/rlimibcomp

COMMON   = $(RLIDIR)/common
OCB      = $(RLIDIR)/ocb
OCP      = $(RLIDIR)/ocp
RLI_OS   = $(RLIDIR)/rli_os

WCONTROL = $(RLIDIR)/wcontrol

CUSTOM	 = .

#
# default object directory:
#
 
OBJ      = ../bin
INC_DIR = ../include
MOVE = move



#
# Default compilation rules:
# NOTE: You may need to change or delete these rules based on your system
# setup.  For example, if you do not wish debug info included, remove the
# -g option in CC_FLAGS
#

CC_INCLUDE    += -I$(RLIDIR)/include -I$(OCP)/include -I../include -I$(WIND_BASE)/target/vxworks/h  -I$(WCONTROL)/include  -I$(WIND_BASE)\target\h\snmp
CC_FLAGS      = -g -O2 -fvolatile -Wall
CC_COMPILER   += -ansi -pedantic -nostdinc
MAKEFLAGS = 
### if -pipe not is supported on this host
#CC_COMPILER +=  -ansi -pedantic -pipe -nostdinc

### insert any necessary linking flags, libraries, etc.
#LDFLAGS      = -rv

WIND_SNMP = $(WIND_BASE)/target/src/snmpv1
MIBSRC = $(WIND_SNMP)/agent/snmpMib2.mib ../../snmp/ASN1/vipercell.mib
MDIRS		= -l $(WIND_SNMP)/mibs -l ../ASN1
MCCMIBS		= rfc1213.mib
MCC		= mibcomp


MIBOID = $(INC_DIR)/miboid.h

$(MIBOID): $(MIBSRC)
	$(MCC) $(MDIRS) -numbers  -o $(OBJDIR)/mib.num rfc1155.smi $(MCCMIBS) $(MIBSRC)
	sed -e "s/-/_/g" <  $(OBJDIR)/mib.num > $(OBJDIR)/mib.num1
	$(RLIMCC) -a $(OBJDIR)/mib.num1
	$(RM) $(subst /,$(DIRCHAR), $@  $(OBJDIR)/mib.num  $(OBJDIR)/mib.num1)
	$(MOVE) $(subst /,$(DIRCHAR), miboid.h  $@)

  
#
# pattern matching rules:
#
 
$(OBJ)/%.o:     $(OCB)/%.c
	$(CXX) -c $(CFLAGS) -o $@ $<

$(OBJ)/%.o:     $(WCONTROL)/%.c
	$(CXX) -c $(CFLAGS) -o $@ $<

$(OBJ)/%.o:     $(COMMON)/%.c
	$(CXX) -c $(CFLAGS) -o $@ $<

$(OBJ)/%.o:     $(RLI_OS)/%.c
	$(CXX)  -c $(CFLAGS) -o $@ $<

$(OBJ)/%.o:     $(QS)/%.c
	$(CXX)  -c $(CFLAGS) -o $@ $<

$(OBJ)/%.o:     $(OCP)/%.c
	$(CXX)  -c $(CFLAGS) -o $@ $<

$(OBJ)/%.o:     $(CUSTOM)/%.c
	$(CXX)  -c $(CFLAGS) -o $@ $<

#
# object list:
# NOTE: Ignition.c also must be generated by the tool and included
# as an object.  We have assumed that it will be located in the 
# ./common directory.  Make changes below if ignition.c
# is located elsewhere
#

# The ./common directory contains source files for standard lib
# functions and other common functionality. 
COMMON_OBJ    = access.o auth.o base64.o binsrch.o compare.o \
              convert.o hash.o linklist.o md5.o msghdlr.o \
              rlstdlib.o sizeof.o tcpd.o tree.o creatint.o

# The ./ocb directory contains source files for the OpenControl 
# Backplane and SNMP MibWay code.
# NOTE: Add the source file names on your MibWay disk to the objects
# below.  For example, if using MibWay for the Epilogue Envoy SNMP 
# stack you would add oc_envoy.o and ocev_cnv.o below. 
OCB_OBJ       = cache.o database.o environ.o mibsrch.o ocb_init.o \
              ocsnmp.o oc_envoy.o ocev_cnv.o

# The ./ocp directory contains source files for JavaControl functions 
OCP_OBJ       = ocp.o ocpconn.o ocpd.o ocpdb.o ocpevt.o ocpgroup.o \
              ocpmm.o ocpopt.o ocpstart.o ocptcp.o ocputil.o

# The ./rli_os directory contains source files for OS specific 
# functionality and porting 



RLI_OS_OBJ    = ansifs.o chorus.o crc32.o decomp.o filemgr.o \
              memmgr.o nucleus.o posix.o prop_os.o \
              psos.o skchorus.o skt_prop.o skt_psos.o sktposix.o \
              sock_nu.o sock_vrt.o sock_vxw.o sock_w32.o vrtx.o \
              vxworks.o win32.o inflate.o


# The ./wcontrol directory contains source files for WebControl 
# functions
WCONTROL_OBJ  = chunk.o enum.o http10.o http11.o httpd.o macro.o \
              persist.o post.o registry.o request.o response.o \
              smtp.o txengine.o upload.o wc_start.o wctools.o

# The ./custom directory contains source files which are modified
# at our environment 

CUSTOM_OBJ  = ignition.o http_main.o http_event.o\
		  http_security.o http_post.o http_feedback.o http_oamOperation.o


#
# dependency variables:
#

RLI_OBJS      = $(COMMON_OBJ) $(OCB_OBJ) $(RLI_OS_OBJ)
JCONTROL_DEP  = $(OCP_OBJ:%=$(OBJ)/%)
WCONTROL_DEP  = $(WCONTROL_OBJ:%=$(OBJ)/%)
RLI_DEP       = $(RLI_OBJS:%=$(OBJ)/%)
CUSTOM_DEP    = $(CUSTOM_OBJ:%=$(OBJ)/%)
 
RM = vxrm
#
# targets:
# NOTE: By default all the provided targets create an archive of
# objects.  To create a library or executable, change the target 
# commands LD/LDFLAGS.
#

MY_OUTPUT = $(OBJDIR)\http.out
MODULE_OBJS = $(MIBOID) $(RLI_DEP) $(JCONTROL_DEP) $(WCONTROL_DEP)  $(CUSTOM_DEP)

all: $(MY_OUTPUT)

$(MY_OUTPUT): $(MODULE_OBJS)
	$(LD) $(LDFLAGS) -r -o $@ $(RLI_DEP) $(JCONTROL_DEP) $(WCONTROL_DEP)  $(CUSTOM_DEP)
	@echo WebControl and JavaControl archive $@ created

cleanall:
	@for %f in ($(notdir $(MODULE_OBJS))) do \
		$(RM) ..\bin\%f

	$(RM) $(MY_OUTPUT)