Windows: export roken symbols
[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                 err.h
38
39 OBJECTS = $(ROKEN_LIBOBJS) \
40           base64.o \
41           cloexec.o ct.o hex.o issuid.o net_read.o net_write.o socket.o \
42           snprintf.o warnerr.o
43
44 $(TOP_LIBDIR)/$(SHLIBOBJ): $(SHLIBOBJ)
45         $(TOP_OBJDIR)/src/config/shlib-install -d $(TOP_LIBDIR) \
46                 -l librokenafs -M $(LIBMAJOR) -m $(LIBMINOR)
47
48 $(SHLIBOBJ): $(OBJECTS) librokenafs.map
49         $(TOP_OBJDIR)/src/config/shlib-build -i -d $(srcdir) -l librokenafs \
50                 -M $(LIBMAJOR) -m $(LIBMINOR) -- \
51                 $(OBJECTS) $(MT_LIBS)
52
53 $(TOP_LIBDIR)/librokenafs.a: librokenafs.a
54         $(INSTALL_DATA) $? $@
55
56 librokenafs.a: $(OBJECTS)
57         $(RM) -f $@
58         $(AR) crv $@ $(OBJECTS)
59         $(RANLIB) $@
60
61 $(TOP_INCDIR)/base64.h: ${UPSTREAM}/base64.h
62         $(INSTALL_DATA) $? $@
63
64 $(TOP_INCDIR)/err.h: ${UPSTREAM}/err.hin
65         cp $? $@
66
67 $(TOP_INCDIR)/roken.h: $(UPSTREAM)/roken.h.in
68         $(INSTALL_DATA) $? $@
69
70 $(TOP_INCDIR)/roken-common.h: $(UPSTREAM)/roken-common.h
71         $(INSTALL_DATA) $? $@
72
73 err.h: ${UPSTREAM}/err.hin
74         cp $? $@
75
76 base64.o: $(UPSTREAM)/base64.c
77         $(AFS_CCRULE) $(UPSTREAM)/base64.c
78
79 cloexec.o: ${UPSTREAM}/cloexec.c
80         $(AFS_CCRULE) $(UPSTREAM)/cloexec.c
81
82 ct.o: ${UPSTREAM}/ct.c
83         $(AFS_CCRULE) $(UPSTREAM)/ct.c
84
85 daemon.o: ${UPSTREAM}/daemon.c
86         $(AFS_CCRULE) $(UPSTREAM)/daemon.c
87
88 ecalloc.o: ${UPSTREAM}/ecalloc.c
89         $(AFS_CCRULE) $(UPSTREAM)/ecalloc.c
90
91 emalloc.o: ${UPSTREAM}/emalloc.c
92         $(AFS_CCRULE) $(UPSTREAM)/emalloc.c
93
94 erealloc.o: ${UPSTREAM}/erealloc.c
95         $(AFS_CCRULE) $(UPSTREAM)/erealloc.c
96
97 err.o: ${UPSTREAM}/err.c err.h
98         $(AFS_CCRULE) $(UPSTREAM)/err.c
99
100 errx.o: ${UPSTREAM}/errx.c err.h
101         $(AFS_CCRULE) $(UPSTREAM)/errx.c
102
103 getopt.o: ${UPSTREAM}/getopt.c
104         $(AFS_CCRULE) $(UPSTREAM)/getopt.c
105
106 getprogname.o: ${UPSTREAM}/getprogname.c
107         $(AFS_CCRULE) $(UPSTREAM)/getprogname.c
108
109 hex.o: ${UPSTREAM}/hex.c
110         $(AFS_CCRULE) $(UPSTREAM)/hex.c
111
112 issuid.o: ${UPSTREAM}/issuid.c
113         $(AFS_CCRULE) $(UPSTREAM)/issuid.c
114
115 mkstemp.o: ${UPSTREAM}/mkstemp.c
116         $(AFS_CCRULE) $(UPSTREAM)/mkstemp.c
117
118 net_read.o: ${UPSTREAM}/net_read.c
119         $(AFS_CCRULE) $(UPSTREAM)/net_read.c
120
121 net_write.o: ${UPSTREAM}/net_write.c
122         $(AFS_CCRULE) $(UPSTREAM)/net_write.c
123
124 socket.o: ${UPSTREAM}/socket.c
125         $(AFS_CCRULE) $(UPSTREAM)/socket.c
126
127 # The upstream snprintf.c has some pointer warnings in it
128 CFLAGS_snprintf.o = @CFLAGS_NOERROR@
129
130 snprintf.o: ${UPSTREAM}/snprintf.c
131         $(AFS_CCRULE) $(UPSTREAM)/snprintf.c
132
133 strlcat.o: ${UPSTREAM}/strlcat.c
134         $(AFS_CCRULE) $(UPSTREAM)/strlcat.c
135
136 strlcpy.o: ${UPSTREAM}/strlcpy.c
137         $(AFS_CCRULE) $(UPSTREAM)/strlcpy.c
138
139 strnlen.o: ${UPSTREAM}/strnlen.c
140         $(AFS_CCRULE) $(UPSTREAM)/strnlen.c
141
142 strsep.o: ${UPSTREAM}/strsep.c
143         $(AFS_CCRULE) $(UPSTREAM)/strsep.c
144
145 verr.o: ${UPSTREAM}/verr.c err.h
146         $(AFS_CCRULE) $(UPSTREAM)/verr.c
147
148 verrx.o: ${UPSTREAM}/verrx.c err.h
149         $(AFS_CCRULE) $(UPSTREAM)/verrx.c
150
151 vsyslog.o: ${UPSTREAM}/vsyslog.c
152         $(AFS_CCRULE) $(UPSTREAM)/vsyslog.c
153
154 vwarn.o: ${UPSTREAM}/vwarn.c err.h
155         $(AFS_CCRULE) $(UPSTREAM)/vwarn.c
156
157 vwarnx.o: ${UPSTREAM}/vwarnx.c err.h
158         $(AFS_CCRULE) $(UPSTREAM)/vwarnx.c
159
160 warn.o: ${UPSTREAM}/warn.c err.h
161         $(AFS_CCRULE) $(UPSTREAM)/warn.c
162
163 warnerr.o: ${UPSTREAM}/warnerr.c err.h
164         $(AFS_CCRULE) $(UPSTREAM)/warnerr.c
165
166 warnx.o: ${UPSTREAM}/warnx.c err.h
167         $(AFS_CCRULE) $(UPSTREAM)/warnx.c