1prefix=@prefix@ 2bindir=@bindir@ 3datadir=@datadir@ 4mydatadir=$(datadir)/et 5mydir=util$(S)et 6BUILDTOP=$(REL)..$(S).. 7RELDIR=../util/et 8SED = sed 9 10##DOS##BUILDTOP = ..\.. 11##DOS##LIBNAME=$(OUTPRE)comerr.lib 12##DOS##XTRA= 13##DOS##OBJFILE=$(OUTPRE)comerr.lst 14 15STLIBOBJS=error_message.o et_name.o com_err.o 16LIBBASE=com_err 17LIBMAJOR=3 18LIBMINOR=0 19LIBINITFUNC=com_err_initialize 20LIBFINIFUNC=com_err_terminate 21 22all-unix: all-liblinks 23clean-unix:: clean-liblinks clean-libs clean-libobjs 24install-unix: install-libs 25 26LINTFLAGS=-uhvb 27LINTFILES= error_message.c et_name.c com_err.c 28LIBOBJS=$(OUTPRE)com_err.$(OBJEXT) \ 29 $(OUTPRE)error_message.$(OBJEXT) \ 30 $(OUTPRE)et_name.$(OBJEXT) 31LOCALINCLUDES=-I. 32 33SRCS= $(srcdir)/error_message.c \ 34 $(srcdir)/et_name.c \ 35 $(srcdir)/com_err.c 36 37EXTRADEPSRCS= $(srcdir)/t_com_err.c $(srcdir)/test_et.c 38 39# 40# Warning flags 41# 42# Uncomment WFLAGS if you want really anal GCC warning messages 43# 44# 45WFLAGS= -ansi -D_POSIX_SOURCE -pedantic \ 46 -Wall -Wwrite-strings -Wpointer-arith \ 47 -Wcast-qual -Wcast-align -Wtraditional \ 48 -Wstrict-prototypes -Wmissing-prototypes \ 49 -Wnested-externs -Winline -DNO_INLINE_FUNCS -Wshadow 50 51DEPLIBS= 52SHLIB_LIBS= 53SHLIB_EXPDEPS = $(SUPPORT_DEPLIB) 54SHLIB_EXPLIBS=-l$(SUPPORT_LIBNAME) $(LIBS) 55SHLIB_LDFLAGS= $(LDFLAGS) @SHLIB_RPATH_DIRS@ 56 57COM_ERR_HDR=$(BUILDTOP)$(S)include$(S)com_err.h 58 59all-windows: $(COM_ERR_HDR) 60 61$(COM_ERR_HDR): com_err.h 62 $(CP) com_err.h "$@" 63 64generate-files-mac: compile_et 65 66com_err.o : com_err.c 67 68test1.o: test1.c 69test2.o: test2.c 70test_et.o: test1.h test2.h 71et1.o: et1.c 72et2.o: et2.c 73test1.c test2.c et1.c et2.c test1.h test2.h et1.h et2.h: \ 74 compile_et et_c.awk et_h.awk 75t_com_err.o: et1.h et2.h t_com_err.c 76 77#test_et: test_et.o test1.o test2.o $(LIBOBJS) 78# $(CC) -o test_et test_et.o test1.o test2.o $(LIBOBJS) 79#t_com_err: t_com_err.o et1.o et2.o $(LIBOBJS) 80# $(CC) -o t_com_err t_com_err.o et1.o et2.o $(LIBOBJS) 81 82test_et: test_et.o test1.o test2.o $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB) 83 $(CC_LINK) -o test_et test_et.o test1.o test2.o $(COM_ERR_LIB) $(SUPPORT_LIB) 84t_com_err: t_com_err.o et1.o et2.o $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB) 85 $(CC_LINK) -o t_com_err t_com_err.o et1.o et2.o $(COM_ERR_LIB) $(SUPPORT_LIB) 86 87$(OUTPRE)test_et.exe: $(OUTPRE)test_et.$(OBJEXT) $(OUTPRE)test1.$(OBJEXT) \ 88 $(OUTPRE)test2.$(OBJEXT) $(CLIB) 89 link $(EXE_LINKOPTS) -out:$(OUTPRE)test_et$(EXEEXT) $** 90 91all-unix: compile_et includes 92 93includes: com_err.h 94 if cmp $(srcdir)/com_err.h \ 95 $(BUILDTOP)/include/com_err.h >/dev/null 2>&1; then :; \ 96 else \ 97 (set -x; $(RM) $(BUILDTOP)/include/com_err.h; \ 98 $(CP) $(srcdir)/com_err.h \ 99 $(BUILDTOP)/include/com_err.h) ; \ 100 fi 101 102clean-unix:: 103 $(RM) $(BUILDTOP)/include/com_err.h 104 105# test_et doesn't have an interesting exit status, but it'll exercise 106# some cases that t_com_err doesn't, so let's see if it crashes. 107check-unix: t_com_err test_et 108 $(RUN_TEST) ./test_et 109 $(RUN_TEST) ./t_com_err 110 111check-windows: $(OUTPRE)test_et$(EXEEXT) 112 set path=$(BUILDTOP)\lib\$(OUTPRE);%path%; 113 path 114 $(OUTPRE)test_et$(EXEEXT) 115 116install-unix: compile_et compile_et.1 117 $(INSTALL) compile_et $(DESTDIR)$(bindir)/compile_et 118 test -d $(DESTDIR)$(mydatadir) || mkdir $(DESTDIR)$(mydatadir) 119 $(INSTALL_DATA) $(srcdir)/et_c.awk $(DESTDIR)$(mydatadir) 120 $(INSTALL_DATA) $(srcdir)/et_h.awk $(DESTDIR)$(mydatadir) 121 $(INSTALL_DATA) $(srcdir)/compile_et.1 $(DESTDIR)$(CLIENT_MANDIR)/compile_et.1 122 123 124install-headers: compile_et 125 126compile_et: $(srcdir)/compile_et.sh $(srcdir)/config_script 127 $(SHELL) $(srcdir)/config_script $(srcdir)/compile_et.sh \ 128 "$(mydatadir)" $(AWK) $(SED) > compile_et 129 chmod 755 compile_et 130 131rebuild: rebuild-c rebuild-h 132rebuild-c: 133 a2p < $(srcdir)/et_c.awk | awk 'NR != 1 || $$0 !~ /^\043!/{print;}' > $(srcdir)/et_c.tmp 134 mv -f $(srcdir)/et_c.tmp $(srcdir)/et_c.pl 135rebuild-h: 136 a2p < $(srcdir)/et_h.awk | awk 'NR != 1 || $$0 !~ /^\043!/{print;}' > $(srcdir)/et_h.tmp 137 mv -f $(srcdir)/et_h.tmp $(srcdir)/et_h.pl 138 139clean-unix:: 140 $(RM) compile_et 141 142depend: 143 144install: com_err.h 145 $(INSTALL_DATA) $(srcdir)/com_err.h $(DESTDIR)$(KRB5_INCDIR)/com_err.h 146 147 148## install_library_target(com_err,$(LIBOBJS),$(LINTFILES),) 149 150clean-unix:: clean-files 151 152clean-files: 153 rm -f *~ \#* *.bak \ 154 *.otl *.aux *.toc *.PS *.dvi *.x9700 *.ps \ 155 *.cp *.fn *.ky *.log *.pg *.tp *.vr \ 156 *.o profiled/?*.o libcom_err.a libcom_err_p.a \ 157 com_err.o compile_et \ 158 et.ar TAGS \ 159 test1.h test1.c test2.h test2.c test_et \ 160 et1.c et1.h et2.c et2.h t_com_err \ 161 eddep makedep *.ln 162 163clean-windows:: 164 $(RM) $(COM_ERR_HDR) 165 166com_err.ps : com_err.dvi 167com_err.dvi: com_err.texinfo 168 169libcom_err.o: $(LIBOBJS) 170 ld -r -s -o libcom_err.o $(LIBOBJS) 171 chmod -x libcom_err.o 172 173archive: et.tar 174 175TAGS: et_name.c error_message.c 176 etags et_name.c error_message.c 177 178depend: includes compile_et 179 180 181@lib_frag@ 182@libobj_frag@ 183 184