Split up libtool support into LWP and pthread
[openafs.git] / src / cmd / Makefile.in
1 # Copyright 2000, International Business Machines Corporation and others.
2 # All Rights Reserved.
3
4 # This software has been released under the terms of the IBM Public
5 # License.  For details, see the LICENSE file in the top-level source
6 # directory or online at http://www.openafs.org/dl/license10.html
7
8 srcdir=@srcdir@
9 include @TOP_OBJDIR@/src/config/Makefile.config
10 include @TOP_OBJDIR@/src/config/Makefile.pthread
11 include @TOP_OBJDIR@/src/config/Makefile.libtool
12
13 LT_objs=cmd_errors.lo cmd.lo config_file.lo AFS_component_version_number.lo
14 LT_deps=$(top_builddir)/src/comerr/liboafs_comerr.la
15 LT_libs=
16
17 LIB64OBJS=cmd_errors64.o cmd64.o 
18
19 all: ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/libcmd_pic.a \
20      ${TOP_INCDIR}/afs/cmd.h liboafs_cmd.la
21
22 all64: all ${TOP_LIBDIR}/libcmd64.a
23
24 generated: cmd.h cmd_errors.c
25
26 ${TOP_LIBDIR}/libcmd.a: libcmd.a
27         ${INSTALL_DATA} $? $@
28
29 ${TOP_LIBDIR}/libcmd_pic.a: libcmd_pic.la
30         $(INSTALL_DATA) .libs/libcmd_pic.a $@
31
32 ${TOP_LIBDIR}/libcmd64.a: libcmd64.a
33         ${INSTALL_DATA} $? $@
34
35 ${TOP_INCDIR}/afs/cmd.h: cmd.h
36         ${INSTALL_DATA} $? $@
37
38 cmd.h: cmd_errors.et cmd.p.h
39         $(RM) -f cmd.h cmd_errors.c
40         ${COMPILE_ET} -p ${srcdir} cmd_errors -h cmd
41
42 cmd_errors.c: cmd.h 
43 cmd.lo: cmd.h
44
45 config_file.lo: $(TOP_SRCDIR)/external/heimdal/krb5/config_file.c krb5_locl.h
46         $(LT_CCRULE) $(TOP_SRCDIR)/external/heimdal/krb5/config_file.c
47
48 cmd_errors64.o: cmd_errors.c
49         ${CC} $(COMMON_CFLAGS) $(CPPFLAGS) ${XCFLAGS64} \
50                 -c -o cmd_errors64.o cmd_errors.c
51
52 cmd64.o: cmd.c cmd.h
53         ${CC} $(COMMON_CFLAGS) $(CPPFLAGS) ${XCFLAGS64} \
54                 -c -o cmd64.o ${srcdir}/cmd.c
55
56 libcmd64.a: ${LIB64OBJS} AFS_component_version_number64.o
57         -$(RM) -f $@
58         $(AR) crv $@ ${LIB64OBJS} AFS_component_version_number64.o
59         $(RANLIB) $@
60
61 libcmd.a: $(LT_objs)
62         $(LT_LDLIB_static) $(LT_objs)
63
64 libcmd_pic.la: $(LT_objs)
65         $(LT_LDLIB_pic) $(LT_objs)
66
67 liboafs_cmd.la: $(LT_objs) $(LT_deps)
68         $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs)
69
70 AFS_component_version_number64.o: AFS_component_version_number.c
71         ${CC} $(COMMON_CFLAGS) $(CPPFLAGS) ${XCFLAGS64} \
72                 -c -o AFS_component_version_number64.o \
73                 AFS_component_version_number.c
74
75 #
76 # Install targets
77 #
78 install: libcmd.a cmd.h
79         ${INSTALL} -d ${DESTDIR}${libdir}/afs
80         ${INSTALL} -d ${DESTDIR}${includedir}/afs
81         ${INSTALL_DATA} libcmd.a ${DESTDIR}$(libdir)/afs/libcmd.a
82         ${INSTALL_DATA} cmd.h ${DESTDIR}${includedir}/afs/cmd.h
83
84 install64: install libcmd64.a
85         ${INSTALL_DATA} libcmd64.a ${DESTDIR}${libdir}/afs/libcmd64.a
86
87 dest: libcmd.a cmd.h 
88         ${INSTALL} -d ${DEST}/lib/afs
89         ${INSTALL} -d ${DEST}/include/afs
90         ${INSTALL_DATA} libcmd.a ${DEST}/lib/afs/libcmd.a
91         ${INSTALL_DATA} cmd.h ${DEST}/include/afs/cmd.h
92
93 dest64: dest libcmd64.a
94         ${INSTALL_DATA} libcmd64.a ${DEST}/lib/afs/libcmd64.a
95
96 #
97 # Misc targets
98 #
99 test tests: 
100         (cd test; $(MAKE) )
101
102 clean:
103         $(LT_CLEAN)
104         $(RM) -f  *.a *.o ctest dtest cmd.h cmd_errors.c core \
105                   AFS_component_version_number.c
106
107 include ../config/Makefile.version