15 # this dir relative to top dir
24 CONSSRCS = console.c console_conf.c authenticate.c @CONS_SRC@
25 CONSOBJS = console.o console_conf.o authenticate.o @CONS_OBJ@
27 # these are the objects that are changed by the .configure process
30 GETTEXT_LIBS = @LIBINTL@
34 CONS_LDFLAGS=@CONS_LDFLAGS@
43 $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(CONS_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
44 #-------------------------------------------------------------------------
45 all: Makefile bconsole @STATIC_CONS@
46 @echo "==== Make of console is good ===="
50 bconsole: Makefile $(CONSOBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
51 $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
52 $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
55 static-bconsole: Makefile $(CONSOBJS) ../lib/libbac.a ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
56 $(LIBTOOL_LINK) $(CXX) -static $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
57 $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
62 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
64 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
67 @$(RMF) -r .libs _libs
70 @$(RMF) console bconsole core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
71 @$(RMF) static-console static-bconsole gmon.out
74 @$(RMF) tags console.conf bconsole.conf
77 if test $(srcdir) = .; then $(MAKE) realclean; fi
78 (cd $(srcdir); $(RMF) Makefile)
81 if test $(srcdir) = .; then $(MAKE) realclean; fi
82 (cd $(srcdir); $(RMF) Makefile)
85 @if test -f ${DESTDIR}${sbindir}/console; then \
87 echo "Warning!!! ${DESTDIR}${sbindir}/console found."; \
88 echo " console has been renamed bconsole, so console"; \
89 echo " is no longer used, and you might want to delete it."; \
92 $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bconsole $(DESTDIR)$(sbindir)/bconsole
93 @srcconf=bconsole.conf; \
94 if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
95 destconf=$$srcconf.new; \
96 echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
99 if test -f ${DESTDIR}${sysconfdir}/console.conf; then \
100 echo "Existing console.conf moved to bconsole.conf"; \
101 @$(MV) ${DESTDIR}${sysconfdir}/console.conf ${DESTDIR}${sysconfdir}/bconsole.conf; \
102 destconf=$$srcconf.new; \
105 echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
106 ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
107 if test -f static-bconsole; then \
108 $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) static-bconsole $(DESTDIR)$(sbindir)/static-bconsole; \
112 (cd $(DESTDIR)$(sbindir); $(RMF) bconsole static-bconsole)
113 (cd $(DESTDIR)$(sysconfdir); $(RMF) console.conf bconsole.conf bconsole.conf.new)
117 # Semi-automatic generation of dependencies:
118 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
119 # and it also includes system headers.
120 # `semi'-automatic since dependencies are generated at distribution time.
123 @$(MV) Makefile Makefile.bak
124 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
125 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
126 @$(CXX) -S -M $(CPPFLAGS) $(CONS_INC) -I$(srcdir) -I$(basedir) *.c >> Makefile
127 @if test -f Makefile ; then \
128 $(RMF) Makefile.bak; \
130 $(MV) Makefile.bak Makefile; \
131 echo " ===== Something went wrong in make depend ====="; \
134 # -----------------------------------------------------------------------
135 # DO NOT DELETE: nice dependency list follows