roken build vsyslog
[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}/roken.h \
14           ${TOP_INCDIR}/roken-common.h
15
16 UPSTREAM = $(TOP_SRCDIR)/external/heimdal/roken
17
18 SHLIBOBJ = librokenafs.${SHLIB_SUFFIX}.${LIBMAJOR}.${LIBMINOR}
19
20 all: $(ROKEN_HEADERS) $(HEADERS) \
21         $(TOP_LIBDIR)/$(SHLIBOBJ) \
22         $(TOP_LIBDIR)/librokenafs.a
23
24 install: librokenafs.a $(SHLIBOBJ)
25         $(TOP_OBJDIR)/src/config/shlib-install -d $(DESTDIR)$(libdir) \
26                 -l librokenafs -M $(LIBMAJOR) -m $(LIBMINOR)
27         $(INSTALL_DATA) librokenafs.a $(DESTDIR)$(libdir)/librokenafs.a
28
29 dest: librokenafs.a $(SHLIBOBJ)
30         $(TOP_OBJDIR)/src/config/shlib-install -d $(DEST)/lib \
31                 -l librokenafs -M $(LIBMAJOR) -m $(LIBMINOR)
32         $(INSTALL_DATA) librokenafs.a $(DEST)/lib/librokenafs.a
33
34 clean:
35         $(RM) -f $(OBJECTS) $(SHLIBOBJ) librokenafs.a librokenafs.exp
36
37 OBJECTS = $(ROKEN_LIBOBJS) \
38           cloexec.o ct.o hex.o issuid.o net_read.o net_write.o socket.o \
39           warnerr.o
40
41 $(TOP_LIBDIR)/$(SHLIBOBJ): $(SHLIBOBJ)
42         $(TOP_OBJDIR)/src/config/shlib-install -d $(TOP_LIBDIR) \
43                 -l librokenafs -M $(LIBMAJOR) -m $(LIBMINOR)
44
45 $(SHLIBOBJ): $(OBJECTS) librokenafs.map
46         $(TOP_OBJDIR)/src/config/shlib-build -i -d $(srcdir) -l librokenafs \
47                 -M $(LIBMAJOR) -m $(LIBMINOR) -- \
48                 $(OBJECTS) $(MT_LIBS)
49
50 $(TOP_LIBDIR)/librokenafs.a: librokenafs.a
51         $(INSTALL_DATA) $? $@
52
53 librokenafs.a: $(OBJECTS)
54         $(RM) -f $@
55         $(AR) crv $@ $(OBJECTS)
56         $(RANLIB) $@
57
58 $(TOP_INCDIR)/err.h: ${UPSTREAM}/err.hin
59         cp $? $@
60
61 $(TOP_INCDIR)/roken.h: $(UPSTREAM)/roken.h.in
62         $(INSTALL_DATA) $? $@
63
64 $(TOP_INCDIR)/roken-common.h: $(UPSTREAM)/roken-common.h
65         $(INSTALL_DATA) $? $@
66
67 err.h: ${UPSTREAM}/err.hin
68         cp $? $@
69
70 cloexec.o: ${UPSTREAM}/cloexec.c
71         $(AFS_CCRULE) $(UPSTREAM)/cloexec.c
72
73 ct.o: ${UPSTREAM}/ct.c
74         $(AFS_CCRULE) $(UPSTREAM)/ct.c
75
76 daemon.o: ${UPSTREAM}/daemon.c
77         $(AFS_CCRULE) $(UPSTREAM)/daemon.c
78
79 ecalloc.o: ${UPSTREAM}/ecalloc.c
80         $(AFS_CCRULE) $(UPSTREAM)/ecalloc.c
81
82 emalloc.o: ${UPSTREAM}/emalloc.c
83         $(AFS_CCRULE) $(UPSTREAM)/emalloc.c
84
85 erealloc.o: ${UPSTREAM}/erealloc.c
86         $(AFS_CCRULE) $(UPSTREAM)/erealloc.c
87
88 err.o: ${UPSTREAM}/err.c err.h
89         $(AFS_CCRULE) $(UPSTREAM)/err.c
90
91 errx.o: ${UPSTREAM}/errx.c err.h
92         $(AFS_CCRULE) $(UPSTREAM)/errx.c
93
94 getopt.o: ${UPSTREAM}/getopt.c
95         $(AFS_CCRULE) $(UPSTREAM)/getopt.c
96
97 getprogname.o: ${UPSTREAM}/getprogname.c
98         $(AFS_CCRULE) $(UPSTREAM)/getprogname.c
99
100 hex.o: ${UPSTREAM}/hex.c
101         $(AFS_CCRULE) $(UPSTREAM)/hex.c
102
103 issuid.o: ${UPSTREAM}/issuid.c
104         $(AFS_CCRULE) $(UPSTREAM)/issuid.c
105
106 net_read.o: ${UPSTREAM}/net_read.c
107         $(AFS_CCRULE) $(UPSTREAM)/net_read.c
108
109 net_write.o: ${UPSTREAM}/net_write.c
110         $(AFS_CCRULE) $(UPSTREAM)/net_write.c
111
112 socket.o: ${UPSTREAM}/socket.c
113         $(AFS_CCRULE) $(UPSTREAM)/socket.c
114
115 strlcat.o: ${UPSTREAM}/strlcat.c
116         $(AFS_CCRULE) $(UPSTREAM)/strlcat.c
117
118 strlcpy.o: ${UPSTREAM}/strlcpy.c
119         $(AFS_CCRULE) $(UPSTREAM)/strlcpy.c
120
121 strnlen.o: ${UPSTREAM}/strnlen.c
122         $(AFS_CCRULE) $(UPSTREAM)/strnlen.c
123
124 verr.o: ${UPSTREAM}/verr.c err.h
125         $(AFS_CCRULE) $(UPSTREAM)/verr.c
126
127 verrx.o: ${UPSTREAM}/verrx.c err.h
128         $(AFS_CCRULE) $(UPSTREAM)/verrx.c
129
130 vsyslog.o: ${UPSTREAM}/vsyslog.c
131         $(AFS_CCRULE) $(UPSTREAM)/vsyslog.c
132
133 vwarn.o: ${UPSTREAM}/vwarn.c err.h
134         $(AFS_CCRULE) $(UPSTREAM)/vwarn.c
135
136 vwarnx.o: ${UPSTREAM}/vwarnx.c err.h
137         $(AFS_CCRULE) $(UPSTREAM)/vwarnx.c
138
139 warn.o: ${UPSTREAM}/warn.c err.h
140         $(AFS_CCRULE) $(UPSTREAM)/warn.c
141
142 warnerr.o: ${UPSTREAM}/warnerr.c err.h
143         $(AFS_CCRULE) $(UPSTREAM)/warnerr.c
144
145 warnx.o: ${UPSTREAM}/warnx.c err.h
146         $(AFS_CCRULE) $(UPSTREAM)/warnx.c