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