14 # this dir relative to top dir
23 CONSSRCS = console.c console_conf.c authenticate.c @CONS_SRC@
24 CONSOBJS = console.o console_conf.o authenticate.o @CONS_OBJ@
26 # these are the objects that are changed by the .configure process
29 GETTEXT_LIBS = @LIBINTL@
33 CONS_LDFLAGS=@CONS_LDFLAGS@
42 $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(CONS_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
43 #-------------------------------------------------------------------------
44 all: Makefile bconsole @STATIC_CONS@
45 @echo "==== Make of console is good ===="
49 bconsole: $(CONSOBJS) ../lib/libbac.a
50 $(CXX) $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
51 $(DLIB) $(CONS_LIBS) -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
54 static-bconsole: $(CONSOBJS) ../lib/libbac.a
55 $(CXX) -static $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
56 $(DLIB) $(CONS_LIBS) -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
61 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
63 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
66 @$(RMF) console bconsole core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
67 @$(RMF) static-console static-bconsole gmon.out
70 @$(RMF) tags console.conf bconsole.conf
73 if test $(srcdir) = .; then $(MAKE) realclean; fi
74 (cd $(srcdir); $(RMF) Makefile)
77 if test $(srcdir) = .; then $(MAKE) realclean; fi
78 (cd $(srcdir); $(RMF) Makefile)
81 @if test -f ${DESTDIR}${sbindir}/console; then \
83 echo "Warning!!! ${DESTDIR}${sbindir}console found."; \
84 echo " console has been renamed bconsole, so console"; \
85 echo " is no longer used, and you might want to delete it."; \
88 $(INSTALL_PROGRAM) bconsole $(DESTDIR)$(sbindir)/bconsole
89 @srcconf=bconsole.conf; \
90 if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
91 destconf=$$srcconf.new; \
92 echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
95 if test -f ${DESTDIR}${sysconfdir}/console.conf; then \
96 echo "Existing console.conf moved to bconsole.conf"; \
97 @$(MV) ${DESTDIR}${sysconfdir}/console.conf ${DESTDIR}${sysconfdir}/bconsole.conf; \
98 destconf=$$srcconf.new; \
101 echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
102 ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
103 if test -f static-bconsole; then \
104 $(INSTALL_PROGRAM) static-bconsole $(DESTDIR)$(sbindir)/static-bconsole; \
108 (cd $(DESTDIR)$(sbindir); $(RMF) bconsole static-bconsole)
109 (cd $(DESTDIR)$(sysconfdir); $(RMF) console.conf bconsole.conf bconsole.conf.new)
113 # Semi-automatic generation of dependencies:
114 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
115 # and it also includes system headers.
116 # `semi'-automatic since dependencies are generated at distribution time.
119 @$(MV) Makefile Makefile.bak
120 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
121 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
122 @$(CXX) -S -M $(CPPFLAGS) $(CONS_INC) -I$(srcdir) -I$(basedir) *.c >> Makefile
123 @if test -f Makefile ; then \
124 $(RMF) Makefile.bak; \
126 $(MV) Makefile.bak Makefile; \
127 echo " ===== Something went wrong in make depend ====="; \
130 # -----------------------------------------------------------------------
131 # DO NOT DELETE: nice dependency list follows