# # Version $Id$ # @MCOMMON@ srcdir = . VPATH = . .PATH: . # one up basedir = .. # top dir topdir = ../.. # this dir relative to top dir thisdir = src/console DEBUG=@DEBUG@ first_rule: all dummy: # CONSSRCS = console.c console_conf.c authenticate.c CONSOBJS = console.o console_conf.o authenticate.o # these are the objects that are changed by the .configure process EXTRAOBJS = @OBJLIST@ CONS_INC=@CONS_INC@ CONS_LIBS=@CONS_LIBS@ CONS_LDFLAGS=@CONS_LDFLAGS@ .SUFFIXES: .c .o .PHONY: .DONTCARE: # inference rules .c.o: $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(CONS_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $< #------------------------------------------------------------------------- all: Makefile console @STATIC_CONS@ @echo "==== Make of console is good ====" @echo " " console: $(CONSOBJS) ../lib/libbac.a ../cats/libsql.a $(CXX) $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \ $(LIBS) $(DLIB) $(CONS_LIBS) -lbac -lsql -lm static-console: $(CONSOBJS) ../lib/libbac.a ../cats/libsql.a $(CXX) -static $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \ $(LIBS) $(DLIB) $(CONS_LIBS) -lbac -lsql -lm strip $@ Makefile: $(srcdir)/Makefile.in $(topdir)/config.status cd $(topdir) \ && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status clean: @$(RMF) console core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3 @$(RMF) static-console gmon.out realclean: clean @$(RMF) tags console.conf distclean: realclean if test $(srcdir) = .; then $(MAKE) realclean; fi (cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS) install: all $(INSTALL_SCRIPT) console $(DESTDIR)$(sbindir)/console @srcconf=console.conf; \ if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \ destconf=$$srcconf.new; \ echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \ else \ destconf=$$srcconf; \ fi; \ echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \ ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf uninstall: (cd $(DESTDIR)$(sbindir); $(RMF) console) (cd $(DESTDIR)$(sysconfdir); $(RMF) console.conf console.conf.new) # Semi-automatic generation of dependencies: # Use gcc -MM because X11 `makedepend' doesn't work on all systems # and it also includes system headers. # `semi'-automatic since dependencies are generated at distribution time. depend: @$(MV) Makefile Makefile.bak @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile @$(CC) -S -M $(CPPFLAGS) $(CONS_INC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile @if test -f Makefile ; then \ $(RMF) Makefile.bak; \ else \ $(MV) Makefile.bak Makefile; \ echo -e "Something went wrong\n\a"; \ fi # ----------------------------------------------------------------------- # DO NOT DELETE: nice dependency list follows