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 ../cats/libsql.a
47 $(CXX) $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
48 $(LIBS) $(DLIB) $(CONS_LIBS) -lbac -lsql -lm
50 static-bconsole: $(CONSOBJS) ../lib/libbac.a ../cats/libsql.a
51 $(CXX) -static $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
52 $(LIBS) $(DLIB) $(CONS_LIBS) -lbac -lsql -lm
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 $(INSTALL_SCRIPT) bconsole $(DESTDIR)$(sbindir)/bconsole
73 @srcconf=bconsole.conf; \
74 if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
75 destconf=$$srcconf.new; \
76 echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
80 echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
81 ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
82 if test -f static-bconsole; then \
83 $(INSTALL_SCRIPT) static-bconsole $(DESTDIR)$(sbindir)/static-bconsole; \
87 (cd $(DESTDIR)$(sbindir); $(RMF) bconsole)
88 (cd $(DESTDIR)$(sysconfdir); $(RMF) bconsole.conf bconsole.conf.new)
92 # Semi-automatic generation of dependencies:
93 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
94 # and it also includes system headers.
95 # `semi'-automatic since dependencies are generated at distribution time.
98 @$(MV) Makefile Makefile.bak
99 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
100 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
101 @$(CC) -S -M $(CPPFLAGS) $(CONS_INC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
102 @if test -f Makefile ; then \
103 $(RMF) Makefile.bak; \
105 $(MV) Makefile.bak Makefile; \
106 echo -e "Something went wrong\n\a"; \
109 # -----------------------------------------------------------------------
110 # DO NOT DELETE: nice dependency list follows