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 \
31 CONSOBJS = console.o console_conf.o authenticate.o support.o interface.o callbacks.o \
34 # these are the objects that are changed by the .configure process
37 #CONS_INC=@CONS_INC@ $(GNOME_INCLUDEDIR)
38 #CONS_LIBS=@CONS_LIBS@ $(GNOME_LIBS)
39 #CONS_LDFLAGS=@CONS_LDFLAGS@ $(GNOME_LIBDIR) $(GNOMEUI_LIBS)
41 CONS_INC=$(GNOME_INCLUDEDIR)
42 CONS_LIBS=$(GNOME_LIBS)
43 CONS_LDFLAGS=$(GNOME_LIBDIR) $(GNOMEUI_LIBS)
45 OPENSSL_INC=@OPENSSL_INC@
46 OPENSSL_LIBS=@OPENSSL_LIBS@
54 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(CONS_INC) $(OPENSSL_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
55 #-------------------------------------------------------------------------
56 all: Makefile gnome-console @STATIC_GNOME_CONS@
57 @echo "==== Make of gnome-console is good ===="
62 mv support.c support.c.orig
63 sed "s%parent = g_object_get_data%parent = \(GtkWidget \*\)g_object_get_data%" support.c.orig >support.c
64 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(CONS_INC) $(OPENSSL_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
66 gnome-console: $(CONSOBJS) ../lib/libbac.a
67 $(CXX) $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -o $@ $(CONSOBJS) \
68 $(LIBS) $(DLIB) $(CONS_LIBS) -lbac -lm $(OPENSSL_LIBS)
70 static-console: static-gnome-console
72 static-gnome-console: $(CONSOBJS) ../lib/libbac.a
73 $(CXX) $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -o $@ $(CONSOBJS) \
74 $(LIBS) $(DLIB) $(CONS_LIBS) -lbac -lm $(OPENSSL_LIBS)
77 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
79 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
82 @$(RMF) gnome-console core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
83 @$(RMF) static-gnome-console gmon.out Makefile.am
87 @$(RM) -rf .deps gnome-console.conf
90 if test $(srcdir) = .; then $(MAKE) realclean; fi
91 (cd $(srcdir); $(RMF) Makefile)
94 if test $(srcdir) = .; then $(MAKE) realclean; fi
95 (cd $(srcdir); $(RMF) Makefile)
98 $(INSTALL_PROGRAM) gnome-console $(DESTDIR)$(sbindir)/gnome-console
99 @srcconf=gnome-console.conf; \
100 if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
101 destconf=$$srcconf.new; \
102 echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
104 destconf=$$srcconf; \
106 echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
107 ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
108 if test -f static-gnome-console; then \
109 $(INSTALL_PROGRAM) static-gnome-console $(DESTDIR)$(sbindir)/static-gnome-console; \
113 (cd $(DESTDIR)$(sbindir); $(RMF) gnome-console static-gnome-console)
114 (cd $(DESTDIR)$(sysconfdir); $(RMF) gnome-console.conf gnome-console.conf.new)
118 # Semi-automatic generation of dependencies:
119 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
120 # and it also includes system headers.
121 # `semi'-automatic since dependencies are generated at distribution time.
124 @$(MV) Makefile Makefile.bak
125 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
126 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
127 @$(CXX) -S -M $(CPPFLAGS) $(XINC) $(OPENSSL_INC) -I$(srcdir) -I$(basedir) $(GNOME_INCLUDEDIR) $(SQL_INC) *.c >> Makefile
128 @if test -f Makefile ; then \
129 $(RMF) Makefile.bak; \
131 $(MV) Makefile.bak Makefile; \
132 echo -e "Something went wrong\n\a"; \
135 # -----------------------------------------------------------------------
136 # DO NOT DELETE: nice dependency list follows