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@
31 OPENSSL_INC = @OPENSSL_INC@
32 OPENSSL_LIBS = @OPENSSL_LIBS@
36 CONS_LDFLAGS=@CONS_LDFLAGS@
44 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(CONS_INC) $(OPENSSL_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
45 #-------------------------------------------------------------------------
46 all: Makefile bconsole @STATIC_CONS@
47 @echo "==== Make of console is good ===="
51 bconsole: $(CONSOBJS) ../lib/libbac.a
52 $(CXX) $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
53 $(DLIB) $(CONS_LIBS) -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
56 static-bconsole: $(CONSOBJS) ../lib/libbac.a
57 $(CXX) -static $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
58 $(DLIB) $(CONS_LIBS) -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
63 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
65 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
68 @$(RMF) console bconsole core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
69 @$(RMF) static-console static-bconsole gmon.out
72 @$(RMF) tags console.conf bconsole.conf
75 if test $(srcdir) = .; then $(MAKE) realclean; fi
76 (cd $(srcdir); $(RMF) Makefile)
79 if test $(srcdir) = .; then $(MAKE) realclean; fi
80 (cd $(srcdir); $(RMF) Makefile)
83 @if test -f ${DESTDIR}${sbindir}/console; then \
85 echo "Warning!!! ${DESTDIR}${sbindir}console found."; \
86 echo " console has been renamed bconsole, so console"; \
87 echo " is no longer used, and you might want to delete it."; \
90 $(INSTALL_PROGRAM) bconsole $(DESTDIR)$(sbindir)/bconsole
91 @srcconf=bconsole.conf; \
92 if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
93 destconf=$$srcconf.new; \
94 echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
97 if test -f ${DESTDIR}${sysconfdir}/console.conf; then \
98 echo "Existing console.conf moved to bconsole.conf"; \
99 @$(MV) ${DESTDIR}${sysconfdir}/console.conf ${DESTDIR}${sysconfdir}/bconsole.conf; \
100 destconf=$$srcconf.new; \
103 echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
104 ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
105 if test -f static-bconsole; then \
106 $(INSTALL_PROGRAM) static-bconsole $(DESTDIR)$(sbindir)/static-bconsole; \
110 (cd $(DESTDIR)$(sbindir); $(RMF) bconsole static-bconsole)
111 (cd $(DESTDIR)$(sysconfdir); $(RMF) console.conf bconsole.conf bconsole.conf.new)
115 # Semi-automatic generation of dependencies:
116 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
117 # and it also includes system headers.
118 # `semi'-automatic since dependencies are generated at distribution time.
121 @$(MV) Makefile Makefile.bak
122 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
123 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
124 @$(CXX) -S -M $(CPPFLAGS) $(CONS_INC) $(OPENSSL_INC) -I$(srcdir) -I$(basedir) *.c >> Makefile
125 @if test -f Makefile ; then \
126 $(RMF) Makefile.bak; \
128 $(MV) Makefile.bak Makefile; \
129 echo " ===== Something went wrong in make depend ====="; \
132 # -----------------------------------------------------------------------
133 # DO NOT DELETE: nice dependency list follows