1
1
####################################################### -*- Makefile -*-
2
## $Id: mfd-makefile.m2m,v 1.11 2004/03/29 23:39:53 rstory Exp $
2
## $Id: mfd-makefile.m2m,v 1.14 2005/07/25 15:37:02 dts12 Exp $
4
########################################################################
5
@if $m2c_mark_boundary == 1@
6
# START code generated by $RCSfile: mfd-makefile.m2m,v $ $Revision: 1.11 $
8
4
########################################################################
11
@open ${name}_Makefile@
12
@ifconf ${name}_Makefile.m2m@
13
@ include ${name}_Makefile.m2m@
7
@ifconf ${name}_Makefile@
8
@ print ${name}_Makefile exists, skipping@
10
@ if "x$m2c_create_fewer_files" eq "x"@
11
@ eval $m2c_create_fewer_files = 0@
13
@ open ${name}_Makefile@
14
@ ifconf ${name}_Makefile.m2m@
15
@ include ${name}_Makefile.m2m@
17
########################################################################
18
@ if $m2c_mark_boundary == 1@
19
# START code generated by $RCSfile: mfd-makefile.m2m,v $ $Revision: 1.14 $
21
########################################################################
17
@if "$mfd_netsnmp_dir" ne ""@
26
@ if "$mfd_netsnmp_dir" ne ""@
18
27
NETSNMPDIR=$mfd_netsnmp_dir
19
28
NETSNMPCONFIG=$(NETSNMPDIR)/net-snmp-config
21
30
NETSNMPCONFIG=net-snmp-config
24
@if "$mfd_netsnmp_dir" ne ""@
33
@ if "$mfd_netsnmp_dir" ne ""@
26
35
# Assuming we're linking against a Net-SNMP build tree (which may or
27
36
# may not be the same as the source tree) and not an installed package.
51
60
LIBS=$(NETSNMPLIBS)
55
64
STRICT_FLAGS = -Wall -Wstrict-prototypes
56
65
CFLAGS=-I. $(NETSNMPCFLAGS) $(STRICT_FLAGS)
59
@if $m2c_create_fewer_files != 1@
68
@ if $m2c_create_fewer_files != 1@
69
$(TABLE_PREFIX)_data_get.c \
70
$(TABLE_PREFIX)_data_set.c \
72
$(TABLE_PREFIX)_data_access.c
65
74
SRCS = $(USER_SRCS) \
76
$(TABLE_PREFIX)_subagent.c \
77
$(TABLE_PREFIX)_interface.c
71
@if $m2c_create_fewer_files != 1@
80
@ if $m2c_create_fewer_files != 1@
81
$(TABLE_PREFIX)_data_get.o \
82
$(TABLE_PREFIX)_data_set.o \
84
$(TABLE_PREFIX)_data_access.o
77
86
OBJS = $(USER_OBJS) \
88
$(TABLE_PREFIX)_subagent.o \
89
$(TABLE_PREFIX)_interface.o
91
TARGETS=$(TABLE_PREFIX)
85
94
.SUFFIXES: .c .o .deps
92
101
$(TARGETS): $(LIB_DEPS)
94
${name}: $(OBJS) ${name}_Makefile
95
$(CC) -o ${name} $(OBJS) $(LIBS)
103
$(TABLE_PREFIX): $(OBJS) $(TABLE_PREFIX)_Makefile
104
$(CC) -o $(TABLE_PREFIX) $(OBJS) $(LIBS)
98
107
rm -f $(OBJS) $(TARGETS)
100
109
@if "$mfd_netsnmp_dir" ne ""@
102
${name}.deps ${name}_subagent.deps ${name}_interface.deps: ${name}_Makefile
103
${name}_data_access.deps: ${name}_Makefile
111
$(TABLE_PREFIX).deps $(TABLE_PREFIX)_subagent.deps $(TABLE_PREFIX)_interface.deps: $(TABLE_PREFIX)_Makefile
112
$(TABLE_PREFIX)_data_access.deps: $(TABLE_PREFIX)_Makefile
104
113
@if $m2c_create_fewer_files != 1@
105
${name}_data_get.deps: ${name}_Makefile
106
${name}_data_set.deps: ${name}_Makefile
114
$(TABLE_PREFIX)_data_get.deps: $(TABLE_PREFIX)_Makefile
115
$(TABLE_PREFIX)_data_set.deps: $(TABLE_PREFIX)_Makefile
110
@echo "Generating makefile $@ ..."
111
@set -e; $(CC) -M $(COPTS) $(CFLAGS) $(CPPFLAGS) $< \
112
| sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
113
[ -s $@ ] || $(RM) $(RMFLAGS) $@
116
include ${name}_subagent.deps
117
include ${name}_interface.deps
118
include ${name}_data_access.deps
119
@if $m2c_create_fewer_files != 1@
120
include ${name}_data_get.deps
121
include ${name}_data_set.deps
119
\@echo "Generating makefile $\@ ..."
120
\@set -e; $(CC) -M $(COPTS) $(CFLAGS) $(CPPFLAGS) $< \
121
| sed 's/\($*\)\.o[ :]*/\1.o $\@ : /g' > $\@; \
122
[ -s $\@ ] || $(RM) $(RMFLAGS) $\@
124
include $(TABLE_PREFIX).deps
125
include $(TABLE_PREFIX)_subagent.deps
126
include $(TABLE_PREFIX)_interface.deps
127
include $(TABLE_PREFIX)_data_access.deps
128
@ if $m2c_create_fewer_files != 1@
129
include $(TABLE_PREFIX)_data_get.deps
130
include $(TABLE_PREFIX)_data_set.deps
127
133
########################################################################
128
@if $m2c_mark_boundary == 1@
129
# END code generated by $RCSfile: mfd-makefile.m2m,v $ $Revision: 1.11 $
134
@ if $m2c_mark_boundary == 1@
135
# END code generated by $RCSfile: mfd-makefile.m2m,v $ $Revision: 1.14 $
137
@ end@ # not including ${name}_Makefile.m2m
138
@ close ${name}_Makefile@
139
@end@ # no existing makefile