~ubuntu-branches/debian/lenny/net-snmp/lenny

« back to all changes in this revision

Viewing changes to local/mib2c-conf.d/mfd-makefile.m2m

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kowalik
  • Date: 2007-05-10 22:20:23 UTC
  • Revision ID: james.westby@ubuntu.com-20070510222023-3fr07xb9i17xvq32
Tags: upstream-5.3.1
ImportĀ upstreamĀ versionĀ 5.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 $
3
3
##
4
 
########################################################################
5
 
@if $m2c_mark_boundary == 1@
6
 
# START code generated by $RCSfile: mfd-makefile.m2m,v $ $Revision: 1.11 $
7
 
@end@
8
4
########################################################################
9
5
##
10
6
@strict token off@
11
 
@open ${name}_Makefile@
12
 
@ifconf ${name}_Makefile.m2m@
13
 
@   include ${name}_Makefile.m2m@
 
7
@ifconf ${name}_Makefile@
 
8
@   print ${name}_Makefile exists, skipping@
14
9
@else@
 
10
@   if "x$m2c_create_fewer_files" eq "x"@
 
11
@      eval $m2c_create_fewer_files = 0@
 
12
@   end@
 
13
@   open ${name}_Makefile@
 
14
@   ifconf ${name}_Makefile.m2m@
 
15
@      include ${name}_Makefile.m2m@
 
16
@   else@
 
17
########################################################################
 
18
@      if $m2c_mark_boundary == 1@
 
19
# START code generated by $RCSfile: mfd-makefile.m2m,v $ $Revision: 1.14 $
 
20
@      end@
 
21
########################################################################
 
22
 
15
23
CC=gcc
 
24
TABLE_PREFIX=${name}
16
25
 
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
20
 
@else@
 
29
@      else@
21
30
NETSNMPCONFIG=net-snmp-config
22
 
@end@
 
31
@      end@
23
32
 
24
 
@if "$mfd_netsnmp_dir" ne ""@
 
33
@      if "$mfd_netsnmp_dir" ne ""@
25
34
 
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.
40
49
LIB_DEPS=$(NETSNMPLIBDEPS)
41
50
LIBS=$(NETSNMPLIBDIRS) -Wl,-Bstatic $(NETSNMPBASELIBS) -Wl,-Bdynamic $(NETSNMPEXTLIBS)
42
51
 
43
 
@else@
 
52
@      else@
44
53
 
45
54
# uncomment this if you have GNU make
46
55
#NETSNMPCFLAGS := $(shell $(NETSNMPCONFIG) --base-cflags)
50
59
 
51
60
LIBS=$(NETSNMPLIBS)
52
61
 
53
 
@end@
 
62
@      end@
54
63
 
55
64
STRICT_FLAGS = -Wall -Wstrict-prototypes
56
65
CFLAGS=-I. $(NETSNMPCFLAGS) $(STRICT_FLAGS)
57
66
 
58
67
USER_SRCS = \
59
 
@if $m2c_create_fewer_files != 1@
60
 
        ${name}_data_get.c \
61
 
        ${name}_data_set.c \
62
 
@end@
63
 
        ${name}_data_access.c
 
68
@      if $m2c_create_fewer_files != 1@
 
69
        $(TABLE_PREFIX)_data_get.c \
 
70
        $(TABLE_PREFIX)_data_set.c \
 
71
@      end@
 
72
        $(TABLE_PREFIX)_data_access.c
64
73
 
65
74
SRCS = $(USER_SRCS) \
66
 
        ${name}.c \
67
 
        ${name}_subagent.c \
68
 
        ${name}_interface.c
 
75
        $(TABLE_PREFIX).c \
 
76
        $(TABLE_PREFIX)_subagent.c \
 
77
        $(TABLE_PREFIX)_interface.c
69
78
 
70
79
USER_OBJS =  \
71
 
@if $m2c_create_fewer_files != 1@
72
 
        ${name}_data_get.o \
73
 
        ${name}_data_set.o \
74
 
@end@
75
 
        ${name}_data_access.o 
 
80
@      if $m2c_create_fewer_files != 1@
 
81
        $(TABLE_PREFIX)_data_get.o \
 
82
        $(TABLE_PREFIX)_data_set.o \
 
83
@      end@
 
84
        $(TABLE_PREFIX)_data_access.o 
76
85
 
77
86
OBJS =  $(USER_OBJS) \
78
 
        ${name}.o \
79
 
        ${name}_subagent.o \
80
 
        ${name}_interface.o
 
87
        $(TABLE_PREFIX).o \
 
88
        $(TABLE_PREFIX)_subagent.o \
 
89
        $(TABLE_PREFIX)_interface.o
81
90
 
82
 
TARGETS=${name}
 
91
TARGETS=$(TABLE_PREFIX)
83
92
 
84
93
.SUFFIXES:
85
94
.SUFFIXES: .c .o .deps
91
100
 
92
101
$(TARGETS): $(LIB_DEPS)
93
102
 
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)
96
105
 
97
106
clean:
98
107
        rm -f $(OBJS) $(TARGETS)
99
108
 
100
109
@if "$mfd_netsnmp_dir" ne ""@
101
110
 
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
107
116
@end@
108
117
 
109
118
%.deps : %.c
110
 
        @echo "Generating makefile $@ ..."
111
 
        @set -e; $(CC) -M $(COPTS) $(CFLAGS) $(CPPFLAGS) $< \
112
 
        | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
113
 
        [ -s $@ ] || $(RM) $(RMFLAGS) $@
114
 
 
115
 
include ${name}.deps
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
122
 
@end@
123
 
@end@
124
 
 
125
 
 
 
119
        \@echo "Generating makefile $\@ ..."
 
120
        \@set -e; $(CC) -M $(COPTS) $(CFLAGS) $(CPPFLAGS) $< \
 
121
        | sed 's/\($*\)\.o[ :]*/\1.o $\@ : /g' > $\@; \
 
122
        [ -s $\@ ] || $(RM) $(RMFLAGS) $\@
 
123
 
 
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
 
131
@      end@
126
132
@end@
127
133
########################################################################
128
 
@if $m2c_mark_boundary == 1@
129
 
# END code generated by $RCSfile: mfd-makefile.m2m,v $ $Revision: 1.11 $
130
 
@end@
 
134
@      if $m2c_mark_boundary == 1@
 
135
# END code generated by $RCSfile: mfd-makefile.m2m,v $ $Revision: 1.14 $
 
136
@      end@
 
137
@   end@ # not including ${name}_Makefile.m2m
 
138
@   close ${name}_Makefile@
 
139
@end@ # no existing makefile