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 OPENSSL_INC = @OPENSSL_INC@
30 OPENSSL_LIBS = @OPENSSL_LIBS@
34 CONS_LDFLAGS=@CONS_LDFLAGS@
42 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(CONS_INC) $(OPENSSL_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) $(OPENSSL_LIBS)
53 static-bconsole: $(CONSOBJS) ../lib/libbac.a
54 $(CXX) -static $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
55 $(DLIB) $(CONS_LIBS) -lbac -lm $(LIBS) $(OPENSSL_LIBS)
59 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
61 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
64 @$(RMF) console bconsole core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
65 @$(RMF) static-console static-bconsole gmon.out
68 @$(RMF) tags console.conf bconsole.conf
71 if test $(srcdir) = .; then $(MAKE) realclean; fi
72 (cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS)
75 if test $(srcdir) = .; then $(MAKE) realclean; fi
76 (cd $(srcdir); $(RMF) Makefile)
79 @if test -f ${DESTDIR}${sbindir}/console; then \
81 echo "Warning!!! ${DESTDIR}${sbindir}console found."; \
82 echo " console has been renamed bconsole, so console"; \
83 echo " is no longer used, and you might want to delete it."; \
86 $(INSTALL_PROGRAM) bconsole $(DESTDIR)$(sbindir)/bconsole
87 @srcconf=bconsole.conf; \
88 if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
89 destconf=$$srcconf.new; \
90 echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
93 if test -f ${DESTDIR}${sysconfdir}/console.conf; then \
94 echo "Existing console.conf moved to bconsole.conf"; \
95 @$(MV) ${DESTDIR}${sysconfdir}/console.conf ${DESTDIR}${sysconfdir}/bconsole.conf; \
96 destconf=$$srcconf.new; \
99 echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
100 ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
101 if test -f static-bconsole; then \
102 $(INSTALL_PROGRAM) static-bconsole $(DESTDIR)$(sbindir)/static-bconsole; \
106 (cd $(DESTDIR)$(sbindir); $(RMF) bconsole static-bconsole)
107 (cd $(DESTDIR)$(sysconfdir); $(RMF) console.conf bconsole.conf bconsole.conf.new)
111 # Semi-automatic generation of dependencies:
112 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
113 # and it also includes system headers.
114 # `semi'-automatic since dependencies are generated at distribution time.
117 @$(MV) Makefile Makefile.bak
118 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
119 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
120 @$(CXX) -S -M $(CPPFLAGS) $(CONS_INC) -I$(srcdir) -I$(basedir) *.c >> Makefile
121 @if test -f Makefile ; then \
122 $(RMF) Makefile.bak; \
124 $(MV) Makefile.bak Makefile; \
125 echo " ===== Something went wrong in make depend ====="; \
128 # -----------------------------------------------------------------------
129 # DO NOT DELETE: nice dependency list follows