Commit | Line | Data |
---|---|---|
805e021f CE |
1 | # |
2 | # Makefile for error-table routines | |
3 | # | |
4 | # Copyright 1987, 1989 MIT Student Information Processing Board | |
5 | # For copyright info, see mit-sipb-cr.h. | |
6 | ||
7 | srcdir=@srcdir@ | |
8 | include @TOP_OBJDIR@/src/config/Makefile.config | |
9 | include @TOP_OBJDIR@/src/config/Makefile.lwp | |
10 | include @TOP_OBJDIR@/src/config/Makefile.lwptool | |
11 | ||
12 | LT_objs = error_msg.lo et_name.lo com_err.lo | |
13 | LT_deps = $(top_builddir)/src/opr/liboafs_opr.la | |
14 | LT_libs = $(LIB_roken) $(MT_LIBS) | |
15 | ||
16 | all: compile_et ${TOP_INCDIR}/afs/com_err.h ${TOP_INCDIR}/afs/error_table.h \ | |
17 | ${TOP_INCDIR}/afs/mit-sipb-cr.h ${TOP_LIBDIR}/libafscom_err.a \ | |
18 | liboafs_comerr.la libcomerr_pic.la | |
19 | ||
20 | buildtools: compile_et | |
21 | ||
22 | ${TOP_INCDIR}/afs/com_err.h: com_err.h | |
23 | ${INSTALL_DATA} $? $@ | |
24 | ||
25 | ${TOP_INCDIR}/afs/error_table.h: error_table.h | |
26 | ${INSTALL_DATA} $? $@ | |
27 | ||
28 | ${TOP_INCDIR}/afs/mit-sipb-cr.h: mit-sipb-cr.h | |
29 | ${INSTALL_DATA} $? $@ | |
30 | ||
31 | ${TOP_LIBDIR}/libafscom_err.a: libafscom_err.a | |
32 | ${INSTALL_DATA} $? $@ | |
33 | ||
34 | et_lex.lex.c: et_lex.lex.l | |
35 | $(RM) -f et_lex.lex.c | |
36 | $(LEX) -t $(srcdir)/et_lex.lex.l > et_lex.lex.c | |
37 | ||
38 | compile_et: compile_et.o error_table.o | |
39 | $(Q)case $(SYS_NAME) in \ | |
40 | *_linux* | *_umlinux* | *_darwin* ) \ | |
41 | $(LT_LDRULE_static_NOQ) compile_et.o error_table.o -L${TOP_LIBDIR} -lopr $(buildtool_roken) $(MT_LIBS);; \ | |
42 | * ) \ | |
43 | $(LT_LDRULE_static_NOQ) compile_et.o error_table.o -L${TOP_LIBDIR} -lopr -ll $(buildtool_roken) $(MT_LIBS);; \ | |
44 | esac | |
45 | ||
46 | libafscom_err.a: $(LT_objs) | |
47 | $(LT_LDLIB_lwp) $(LT_objs) | |
48 | ||
49 | liboafs_comerr.la: $(LT_objs) $(LT_deps) | |
50 | $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs) | |
51 | ||
52 | libcomerr_pic.la: $(LT_objs) | |
53 | $(LT_LDLIB_pic) $(LT_objs) | |
54 | ||
55 | # When we build this file, we're using a .c file that's in the object directory, | |
56 | # so we need to add the source directory to the includes to pick up local headers. | |
57 | # | |
58 | CFLAGS_error_table.o= -I${srcdir} @CFLAGS_NOUNUSED@ @CFLAGS_NOOLDSTYLE@ | |
59 | ||
60 | # | |
61 | # Installation targets | |
62 | # | |
63 | install: compile_et com_err.h error_table.h mit-sipb-cr.h libafscom_err.a \ | |
64 | liboafs_comerr.la | |
65 | ${INSTALL} -d ${DESTDIR}${bindir} | |
66 | ${INSTALL} -d ${DESTDIR}${includedir}/afs | |
67 | ${INSTALL} -d ${DESTDIR}${libdir}/afs | |
68 | ${INSTALL_PROGRAM} compile_et ${DESTDIR}${bindir}/afs_compile_et | |
69 | ${INSTALL_DATA} ${srcdir}/com_err.h ${DESTDIR}${includedir}/afs/com_err.h | |
70 | ${INSTALL_DATA} ${srcdir}/error_table.h ${DESTDIR}${includedir}/afs/error_table.h | |
71 | ${INSTALL_DATA} ${srcdir}/mit-sipb-cr.h ${DESTDIR}${includedir}/afs/mit-sipb-cr.h | |
72 | ${INSTALL_DATA} libafscom_err.a ${DESTDIR}${libdir}/afs/libafscom_err.a | |
73 | ||
74 | dest: compile_et com_err.h error_table.h mit-sipb-cr.h libafscom_err.a | |
75 | ${INSTALL} -d ${DEST}/bin | |
76 | ${INSTALL} -d ${DEST}/include/afs | |
77 | ${INSTALL} -d ${DEST}/lib/afs | |
78 | ${INSTALL_PROGRAM} compile_et ${DEST}/bin/afs_compile_et | |
79 | ${INSTALL_DATA} ${srcdir}/com_err.h ${DEST}/include/afs/com_err.h | |
80 | ${INSTALL_DATA} ${srcdir}/error_table.h ${DEST}/include/afs/error_table.h | |
81 | ${INSTALL_DATA} ${srcdir}/mit-sipb-cr.h ${DEST}/include/afs/mit-sipb-cr.h | |
82 | ${INSTALL_DATA} libafscom_err.a ${DEST}/lib/afs/libafscom_err.a | |
83 | ||
84 | clean: | |
85 | $(LT_CLEAN) | |
86 | $(RM) -f *~ \#* *.bak *.otl *.aux *.toc *.PS *.dvi *.x9700 *.ps \ | |
87 | *.cp *.fn *.ky *.log *.pg *.tp *.vr *.o libafscom_err.a \ | |
88 | com_err.o compile_et et.ar TAGS y.tab.c lex.yy.c error_table.c \ | |
89 | et_lex.lex.c test1.h test1.c test2.h test2.c \ | |
90 | eddep makedep core AFS_component_version_number.c | |
91 | ||
92 | test: | |
93 | cd test; $(MAKE) | |
94 | ||
95 | compile_et.o: AFS_component_version_number.c | |
96 | # specify yacc build product as a dependency so our .c.o rule will apply | |
97 | error_table.o: et_lex.lex.c error_table.c | |
98 | error_table.lo: et_lex.lex.c error_table.c | |
99 | ||
100 | include ../config/Makefile.version |