roken: Add the strsep function
[openafs.git] / src / roken / Makefile.in
1 # A roken library for AFS
2
3 LIBMAJOR=1
4 LIBMINOR=1
5
6 srcdir=@srcdir@
7 include @TOP_OBJDIR@/src/config/Makefile.config
8 include @TOP_OBJDIR@/src/config/Makefile.shared
9
10 INSTALL = @INSTALL@
11 INSTALL_DATA = @INSTALL_DATA@
12
13 HEADERS = ${TOP_INCDIR}/base64.h \
14           ${TOP_INCDIR}/roken.h \
15           ${TOP_INCDIR}/roken-common.h
16
17 UPSTREAM = $(TOP_SRCDIR)/external/heimdal/roken
18
19 SHLIBOBJ = librokenafs.${SHLIB_SUFFIX}.${LIBMAJOR}.${LIBMINOR}
20
21 all: $(ROKEN_HEADERS) $(HEADERS) \
22         $(TOP_LIBDIR)/$(SHLIBOBJ) \
23         $(TOP_LIBDIR)/librokenafs.a
24
25 install: librokenafs.a $(SHLIBOBJ)
26         $(TOP_OBJDIR)/src/config/shlib-install -d $(DESTDIR)$(libdir) \
27                 -l librokenafs -M $(LIBMAJOR) -m $(LIBMINOR)
28         $(INSTALL_DATA) librokenafs.a $(DESTDIR)$(libdir)/librokenafs.a
29
30 dest: librokenafs.a $(SHLIBOBJ)
31         $(TOP_OBJDIR)/src/config/shlib-install -d $(DEST)/lib \
32                 -l librokenafs -M $(LIBMAJOR) -m $(LIBMINOR)
33         $(INSTALL_DATA) librokenafs.a $(DEST)/lib/librokenafs.a
34
35 clean:
36         $(RM) -f $(OBJECTS) $(SHLIBOBJ) librokenafs.a librokenafs.exp
37
38 OBJECTS = $(ROKEN_LIBOBJS) \
39           base64.o \
40           cloexec.o ct.o hex.o issuid.o net_read.o net_write.o socket.o \
41           snprintf.o warnerr.o
42
43 $(TOP_LIBDIR)/$(SHLIBOBJ): $(SHLIBOBJ)
44         $(TOP_OBJDIR)/src/config/shlib-install -d $(TOP_LIBDIR) \
45                 -l librokenafs -M $(LIBMAJOR) -m $(LIBMINOR)
46
47 $(SHLIBOBJ): $(OBJECTS) librokenafs.map
48         $(TOP_OBJDIR)/src/config/shlib-build -i -d $(srcdir) -l librokenafs \
49                 -M $(LIBMAJOR) -m $(LIBMINOR) -- \
50                 $(OBJECTS) $(MT_LIBS)
51
52 $(TOP_LIBDIR)/librokenafs.a: librokenafs.a
53         $(INSTALL_DATA) $? $@
54
55 librokenafs.a: $(OBJECTS)
56         $(RM) -f $@
57         $(AR) crv $@ $(OBJECTS)
58         $(RANLIB) $@
59
60 $(TOP_INCDIR)/base64.h: ${UPSTREAM}/base64.h
61         $(INSTALL_DATA) $? $@
62
63 $(TOP_INCDIR)/err.h: ${UPSTREAM}/err.hin
64         cp $? $@
65
66 $(TOP_INCDIR)/roken.h: $(UPSTREAM)/roken.h.in
67         $(INSTALL_DATA) $? $@
68
69 $(TOP_INCDIR)/roken-common.h: $(UPSTREAM)/roken-common.h
70         $(INSTALL_DATA) $? $@
71
72 err.h: ${UPSTREAM}/err.hin
73         cp $? $@
74
75 base64.o: $(UPSTREAM)/base64.c
76         $(AFS_CCRULE) $(UPSTREAM)/base64.c
77
78 cloexec.o: ${UPSTREAM}/cloexec.c
79         $(AFS_CCRULE) $(UPSTREAM)/cloexec.c
80
81 ct.o: ${UPSTREAM}/ct.c
82         $(AFS_CCRULE) $(UPSTREAM)/ct.c
83
84 daemon.o: ${UPSTREAM}/daemon.c
85         $(AFS_CCRULE) $(UPSTREAM)/daemon.c
86
87 ecalloc.o: ${UPSTREAM}/ecalloc.c
88         $(AFS_CCRULE) $(UPSTREAM)/ecalloc.c
89
90 emalloc.o: ${UPSTREAM}/emalloc.c
91         $(AFS_CCRULE) $(UPSTREAM)/emalloc.c
92
93 erealloc.o: ${UPSTREAM}/erealloc.c
94         $(AFS_CCRULE) $(UPSTREAM)/erealloc.c
95
96 err.o: ${UPSTREAM}/err.c err.h
97         $(AFS_CCRULE) $(UPSTREAM)/err.c
98
99 errx.o: ${UPSTREAM}/errx.c err.h
100         $(AFS_CCRULE) $(UPSTREAM)/errx.c
101
102 getopt.o: ${UPSTREAM}/getopt.c
103         $(AFS_CCRULE) $(UPSTREAM)/getopt.c
104
105 getprogname.o: ${UPSTREAM}/getprogname.c
106         $(AFS_CCRULE) $(UPSTREAM)/getprogname.c
107
108 hex.o: ${UPSTREAM}/hex.c
109         $(AFS_CCRULE) $(UPSTREAM)/hex.c
110
111 issuid.o: ${UPSTREAM}/issuid.c
112         $(AFS_CCRULE) $(UPSTREAM)/issuid.c
113
114 net_read.o: ${UPSTREAM}/net_read.c
115         $(AFS_CCRULE) $(UPSTREAM)/net_read.c
116
117 net_write.o: ${UPSTREAM}/net_write.c
118         $(AFS_CCRULE) $(UPSTREAM)/net_write.c
119
120 socket.o: ${UPSTREAM}/socket.c
121         $(AFS_CCRULE) $(UPSTREAM)/socket.c
122
123 # The upstream snprintf.c has some pointer warnings in it
124 CFLAGS_snprintf.o = @CFLAGS_NOERROR@
125
126 snprintf.o: ${UPSTREAM}/snprintf.c
127         $(AFS_CCRULE) $(UPSTREAM)/snprintf.c
128
129 strlcat.o: ${UPSTREAM}/strlcat.c
130         $(AFS_CCRULE) $(UPSTREAM)/strlcat.c
131
132 strlcpy.o: ${UPSTREAM}/strlcpy.c
133         $(AFS_CCRULE) $(UPSTREAM)/strlcpy.c
134
135 strnlen.o: ${UPSTREAM}/strnlen.c
136         $(AFS_CCRULE) $(UPSTREAM)/strnlen.c
137
138 strsep.o: ${UPSTREAM}/strsep.c
139         $(AFS_CCRULE) $(UPSTREAM)/strsep.c
140
141 verr.o: ${UPSTREAM}/verr.c err.h
142         $(AFS_CCRULE) $(UPSTREAM)/verr.c
143
144 verrx.o: ${UPSTREAM}/verrx.c err.h
145         $(AFS_CCRULE) $(UPSTREAM)/verrx.c
146
147 vsyslog.o: ${UPSTREAM}/vsyslog.c
148         $(AFS_CCRULE) $(UPSTREAM)/vsyslog.c
149
150 vwarn.o: ${UPSTREAM}/vwarn.c err.h
151         $(AFS_CCRULE) $(UPSTREAM)/vwarn.c
152
153 vwarnx.o: ${UPSTREAM}/vwarnx.c err.h
154         $(AFS_CCRULE) $(UPSTREAM)/vwarnx.c
155
156 warn.o: ${UPSTREAM}/warn.c err.h
157         $(AFS_CCRULE) $(UPSTREAM)/warn.c
158
159 warnerr.o: ${UPSTREAM}/warnerr.c err.h
160         $(AFS_CCRULE) $(UPSTREAM)/warnerr.c
161
162 warnx.o: ${UPSTREAM}/warnx.c err.h
163         $(AFS_CCRULE) $(UPSTREAM)/warnx.c