14 # this dir relative to top dir
15 thisdir = src/gnome2-console
22 GNOME_INCLUDEDIR = @GNOME_INCLUDEDIR@
23 GNOMEUI_LIBS = @GNOMEUI_LIBS@
24 GNOME_LIBDIR = @GNOME_LIBDIR@
25 GNOME_LIBS = @GNOME_LIBS@
29 CONSSRCS = console.c console_conf.c authenticate.c support.c interface.c callbacks.c
30 CONSOBJS = console.o console_conf.o authenticate.o support.o interface.o callbacks.o
32 # these are the objects that are changed by the .configure process
35 #CONS_INC=@CONS_INC@ $(GNOME_INCLUDEDIR)
36 #CONS_LIBS=@CONS_LIBS@ $(GNOME_LIBS)
37 #CONS_LDFLAGS=@CONS_LDFLAGS@ $(GNOME_LIBDIR) $(GNOMEUI_LIBS)
39 CONS_INC=$(GNOME_INCLUDEDIR)
40 CONS_LIBS=$(GNOME_LIBS)
41 CONS_LDFLAGS=$(GNOME_LIBDIR) $(GNOMEUI_LIBS)
50 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(CONS_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
51 #-------------------------------------------------------------------------
52 all: Makefile gnome-console @STATIC_GNOME_CONS@
53 @echo "==== Make of gnome-console is good ===="
58 mv support.c support.c.orig
59 sed "s%parent = g_object_get_data%parent = \(GtkWidget \*\)g_object_get_data%" support.c.orig >support.c
60 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(CONS_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
62 gnome-console: $(CONSOBJS) ../lib/libbac.a ../cats/libsql.a
63 $(CXX) $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
64 $(LIBS) $(DLIB) $(CONS_LIBS) -lbac -lsql -lm
66 static-console: static-gnome-console
68 static-gnome-console: $(CONSOBJS) ../lib/libbac.a ../cats/libsql.a
69 $(CXX) $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
70 $(LIBS) $(DLIB) $(CONS_LIBS) -lbac -lsql -lm
73 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
75 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
78 @$(RMF) gnome-console core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
79 @$(RMF) static-gnome-console gmon.out
83 @$(RM) -rf .deps gnome-console.conf
86 if test $(srcdir) = .; then $(MAKE) realclean; fi
87 (cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS)
90 $(INSTALL_PROGRAM) gnome-console $(DESTDIR)$(sbindir)/gnome-console
91 @srcconf=gnome-console.conf; \
92 if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
93 destconf=$$srcconf.new; \
94 echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
98 echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
99 ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
100 if test -f static-gnome-console; then \
101 $(INSTALL_PROGRAM) static-gnome-console $(DESTDIR)$(sbindir)/static-gnome-console; \
105 (cd $(DESTDIR)$(sbindir); $(RMF) gnome-console static-gnome-console)
106 (cd $(DESTDIR)$(sysconfdir); $(RMF) gnome-console.conf gnome-console.conf.new)
110 # Semi-automatic generation of dependencies:
111 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
112 # and it also includes system headers.
113 # `semi'-automatic since dependencies are generated at distribution time.
116 @$(MV) Makefile Makefile.bak
117 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
118 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
119 @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(GNOME_INCLUDEDIR) $(SQL_INC) *.c >> Makefile
120 @if test -f Makefile ; then \
121 $(RMF) Makefile.bak; \
123 $(MV) Makefile.bak Makefile; \
124 echo -e "Something went wrong\n\a"; \
127 # -----------------------------------------------------------------------
128 # DO NOT DELETE: nice dependency list follows