mirror of https://github.com/MidnightCommander/mc
383 lines
8.8 KiB
Makefile
383 lines
8.8 KiB
Makefile
srcdir = @srcdir@
|
|
VPATH = @srcdir@
|
|
|
|
rootdir = $(srcdir)/..
|
|
@MCFG@@MCF@
|
|
|
|
GNOMEDEFS = -DHAVE_X -DHAVE_GNOME @GNOME_INCLUDEDIR@
|
|
|
|
#
|
|
# Warning: Don't add `-I$(rootdir)/src' to CFLAGS -- it breaks compilation
|
|
# on glibc2.1 systems because glibc includes src/features.h instead of it's
|
|
# own features.h. Run `make cleansourcelinks; make sourcelinks'/modify targets
|
|
# cleansourcelinks/sourclinks in case mc doesn't find it's include files.
|
|
#
|
|
CFLAGS = -g $(XCFLAGS) @X_CFLAGS@ -I.
|
|
CPPFLAGS = $(XCPPFLAGS) -I$(vfsdir) $(GNOMEDEFS)
|
|
LDFLAGS = $(XLDFLAGS) @GNOME_LIBDIR@ @GNOMEUI_LIBS@
|
|
CORBA_LDFLAGS = $(XLDFLAGS) @GNOME_LIBDIR@ @GNOMEGNORBA_LIBS@
|
|
DEFS = $(XDEFS)
|
|
LIBS = $(XLIBS) @TERMNET@
|
|
EXTRALIBS = -L../vfs @LVFS@ -L../gtkedit -lgtkedit @LINTL@
|
|
INSTALL = @INSTALL@
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
GNOME_IDLDIR = @GNOME_IDLDIR@
|
|
|
|
PIXMAPS = \
|
|
dev.xpm \
|
|
link.xpm \
|
|
directory.xpm \
|
|
listing-list.xpm \
|
|
listing-iconic.xpm \
|
|
listing-custom.xpm \
|
|
listing-brief-list.xpm \
|
|
dir-close.xpm \
|
|
dir-open.xpm
|
|
|
|
GNOMESRCS = \
|
|
gaction.c \
|
|
gcache.c \
|
|
gcliplabel.c \
|
|
gcustom-layout.c \
|
|
gcmd.c \
|
|
gcorba.c \
|
|
gdesktop-icon.c \
|
|
gdesktop-init.c \
|
|
gdesktop-prefs.c \
|
|
gdesktop.c \
|
|
gdialogs.c \
|
|
gdnd.c \
|
|
ghelp.c \
|
|
gicon.c \
|
|
ginfo.c \
|
|
gkey.c \
|
|
glayout.c \
|
|
gmain.c \
|
|
gmount.c \
|
|
gmc-chargrid.c \
|
|
gmenu.c \
|
|
gmetadata.c \
|
|
gpageprop.c \
|
|
gpopup2.c \
|
|
gprefs.c \
|
|
gprint.c \
|
|
gprop.c \
|
|
gnome-file-property-dialog.c \
|
|
gnome-open-dialog.c \
|
|
gscreen.c \
|
|
gsession.c \
|
|
gtools.c \
|
|
gtkdtree.c \
|
|
gtkflist.c \
|
|
gtree.c \
|
|
gutil.c \
|
|
gview.c \
|
|
gwidget.c
|
|
|
|
GNOMEHDRS = \
|
|
gcache.h \
|
|
gcliplabel.h \
|
|
gcmd.h \
|
|
gconf.h \
|
|
gcorba.h \
|
|
gcustom-layout.h \
|
|
gdesktop-icon.h \
|
|
gdesktop-init.h \
|
|
gdesktop-prefs.h \
|
|
gdesktop.h \
|
|
gdnd.h \
|
|
gicon.h \
|
|
gmain.h \
|
|
gmount.h \
|
|
gmc-chargrid.h \
|
|
gmetadata.h \
|
|
gpageprop.h \
|
|
gpopup.h \
|
|
gprefs.h \
|
|
gprint.h \
|
|
gprop.h \
|
|
gnome-file-property-dialog.h \
|
|
gnome-open-dialog.h \
|
|
gscreen.h \
|
|
gsession.h \
|
|
gtkdtree.h \
|
|
gtkflist.h \
|
|
gtree.h \
|
|
gwidget.h
|
|
|
|
ICONS = \
|
|
directory.xpm \
|
|
i-blockdev.png \
|
|
i-cdrom.png \
|
|
i-chardev.png \
|
|
i-core.png \
|
|
i-dirclosed.png \
|
|
i-directory.png \
|
|
i-executable.png \
|
|
i-fifo.png \
|
|
i-floppy.png \
|
|
i-nfs.png \
|
|
i-printer.png \
|
|
i-regular.png \
|
|
i-sock.png \
|
|
i-stalled.png \
|
|
i-symlink.png \
|
|
i-zipdisk.png \
|
|
i-zipdisk2.png
|
|
|
|
#
|
|
# These objects from ../src do not depend on HAVE_X / HAVE_GNOME??
|
|
#
|
|
LOBJS = mad.o
|
|
|
|
#
|
|
# These objects from ../src do depend on HAVE_GNOME
|
|
#
|
|
OOBJS = dlg.o screen.o widget.o wtools.o boxes.o \
|
|
file.o find.o dialog.o key.o view.o \
|
|
panelize.o hotlist.o background.o dir.o util.o \
|
|
win.o color.o profile.o user.o ext.o setup.o \
|
|
subshell.o terms.o fsusage.o mountlist.o \
|
|
@REGEX_O@ complete.o command.o \
|
|
cmd.o utilunix.o xslint.o gdialogs.o filenot.o \
|
|
fileopctx.o treestore.o
|
|
|
|
CORBAOBJS = \
|
|
main-corba.o \
|
|
gcorba.o \
|
|
gmount-corba.o \
|
|
magicdev-common.o \
|
|
magicdev-stubs.o \
|
|
FileManager-skels.o \
|
|
FileManager-stubs.o \
|
|
FileManager-common.o
|
|
|
|
OBJS = \
|
|
$(LOBJS) \
|
|
$(OOBJS) \
|
|
gaction.o \
|
|
gcache.o \
|
|
gcliplabel.o \
|
|
gcmd.o \
|
|
gcustom-layout.o \
|
|
gdesktop-icon.o \
|
|
gdesktop-init.o \
|
|
gdesktop-prefs.o \
|
|
gdesktop.o \
|
|
gdnd.o \
|
|
ghelp.o \
|
|
gicon.o \
|
|
ginfo.o \
|
|
gkey.o \
|
|
glayout.o \
|
|
gmain.o \
|
|
gmc-chargrid.o \
|
|
gmenu.o \
|
|
gmetadata.o \
|
|
gpageprop.o \
|
|
gpopup2.o \
|
|
gprefs.o \
|
|
gprint.o \
|
|
gprop.o \
|
|
gnome-file-property-dialog.o \
|
|
gnome-open-dialog.o \
|
|
gscreen.o \
|
|
gsession.o \
|
|
gtools.o \
|
|
gtree.o \
|
|
gutil.o \
|
|
gview.o \
|
|
gtkdtree.o \
|
|
gtkflist.o \
|
|
gwidget.o
|
|
|
|
NORMALOBJS = \
|
|
gmount.o \
|
|
main.o
|
|
|
|
CORBA_GENERATED = \
|
|
FileManager.h \
|
|
FileManager-stubs.c \
|
|
FileManager-skels.c \
|
|
FileManager-common.c
|
|
|
|
MAGICDEV_GENERATED = \
|
|
magicdev-common.c \
|
|
magicdev-stubs.c \
|
|
magicdev.h
|
|
|
|
CLIENTSRCS = gmc-client.c
|
|
|
|
CLIENTOBJS = \
|
|
gmc-client.o \
|
|
FileManager-stubs.o \
|
|
FileManager-common.o
|
|
|
|
|
|
$(CORBA_GENERATED): $(rootdir)/idl/FileManager.idl
|
|
orbit-idl `gnome-config --cflags idl` $(rootdir)/idl/FileManager.idl
|
|
|
|
$(MAGICDEV_GENERATED): $(srcdir)/magicdev.idl
|
|
orbit-idl `gnome-config --cflags idl` --noskels $(srcdir)/magicdev.idl
|
|
|
|
FileManager-impl.c: FileManager.h
|
|
|
|
EXTRA_DIST = \
|
|
gnome.TODO \
|
|
layout \
|
|
gmc.gnorba \
|
|
mc.keys.in.in \
|
|
gimp.image.desktop \
|
|
magicdev.idl
|
|
|
|
DISTGNOME_NEW = \
|
|
gimp.image.desktop application.x-gnumeric.desktop
|
|
|
|
DISTGNOME = \
|
|
Makefile.in ChangeLog $(EXTRA_DIST) $(CORBA_SOURCES) \
|
|
$(PIXMAPS) $(ICONS) $(GNOMESRCS) $(GNOMEHDRS) $(DISTGNOME_NEW) \
|
|
$(CLIENTSRCS) gmc-window.c gmc-window.h
|
|
|
|
.c.o:
|
|
$(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
|
|
|
|
main-corba.o: main.c
|
|
$(CC) -c -DHAVE_CORBA $(CPPFLAGS) $(DEFS) $(CFLAGS) $< -o main-corba.o
|
|
|
|
gmount-corba.o: gmount.c
|
|
$(CC) -c -DHAVE_CORBA $(CPPFLAGS) $(DEFS) $(CFLAGS) $< -o gmount-corba.o
|
|
|
|
gcorba.o: gcorba.c $(CORBA_GENERATED)
|
|
gmount.o: gmount.c $(MAGICDEV_GENERATED)
|
|
|
|
all: @mx@ Makefile mc.keys
|
|
|
|
Makefile: Makefile.in ../config.status
|
|
(cd ..; CONFIG_FILES=gnome/Makefile CONFIG_HEADERS= ./config.status)
|
|
|
|
mx: checklinks
|
|
$(MAKE) plain-gmc
|
|
$(MAKE) corba-gmc
|
|
$(MAKE) gmc-client
|
|
@echo ----------------------------------------------------------
|
|
@echo -
|
|
@echo - GMC no longer exists here. Use plain-gmc or corba-gmc
|
|
@echo - if you are debugging/working on this.
|
|
@echo -
|
|
@echo -----------------------------------------------------------
|
|
@touch mx
|
|
|
|
plain-gmc: @LIBVFS@ $(OBJS) $(NORMALOBJS) libgtkedit.a
|
|
$(CC) -o plain-gmc $(NORMALOBJS) $(OBJS) $(EXTRALIBS) $(LDFLAGS) $(LIBS)
|
|
|
|
corba-gmc: @LIBVFS@ $(OBJS) $(CORBAOBJS) libgtkedit.a
|
|
$(CC) -o corba-gmc $(CORBAOBJS) $(OBJS) $(EXTRALIBS) $(CORBA_LDFLAGS) $(LIBS)
|
|
|
|
gmc-client: $(CLIENTOBJS)
|
|
$(CC) -o gmc-client $(CLIENTOBJS) $(CORBA_LDFLAGS) $(LIBS)
|
|
|
|
mc.keys: mc.keys.in Makefile
|
|
sed -e 's^\@icondir\@^$(icondir)^g' \
|
|
-e 's^\@gnomeicondir\@^$(gnomeicondir)^g' \
|
|
< mc.keys.in > mc.keys.tmp \
|
|
&& mv mc.keys.tmp mc.keys
|
|
|
|
mc.keys.in: mc.keys.in.in Makefile.in ../config.status
|
|
(cd ..; CONFIG_FILES=gnome/mc.keys.in CONFIG_HEADERS= ./config.status)
|
|
|
|
@LIBVFS@:
|
|
cd ../vfs; $(MAKE) @LIBVFS@
|
|
@PCENTRULE@ $(RMF) @LIBVFS@
|
|
@PCENTRULE@ $(LN_S) ../vfs/@LIBVFS@ .
|
|
|
|
libgtkedit.a:
|
|
cd ../gtkedit; $(MAKE) libgtkedit.a
|
|
@PCENTRULE@ $(RMF) libgtkedit.a
|
|
@PCENTRULE@ $(LN_S) ../gtkedit/libgtkedit.a .
|
|
|
|
checklinks:
|
|
@if test -f $(gnomedir)/regex.c; then echo ok; \
|
|
else $(MAKE) sourcelinks; fi
|
|
@if test -f regex.o; then echo ok; else $(MAKE) links; fi
|
|
|
|
links:
|
|
for I in $(LOBJS); do $(RMF) $$I; $(LN_S) ../src/$$I $$I >/dev/null 2>&1; done; true
|
|
|
|
sourcelinks:
|
|
-cd $(gnomedir); $(LN_S) ../src/*.[ch] . >/dev/null 2>&1; true
|
|
|
|
cleansourcelinks:
|
|
-if test -f $(gnomedir)/regex.c; then \
|
|
cd $(gnomedir); find . -lname '*.[ch]' | xargs $(RM); \
|
|
fi
|
|
|
|
check:
|
|
@echo no tests are supplied.
|
|
|
|
TAGS: $(GNOMESRCS)
|
|
etags $(GNOMESRCS)
|
|
|
|
clean:
|
|
$(RMF) plain-gmc corba-gmc *.o core a.out mx @LIBVFS@ libgtkedit.a $(CORBA_GENERATED)
|
|
|
|
realclean: clean
|
|
$(RMF) .depend
|
|
$(RMF) TAGS
|
|
$(RMF) *~
|
|
|
|
distclean: cleansourcelinks
|
|
$(RMF) $(srcdir)/*~ $(srcdir)/*.o $(srcdir)/gmc $(srcdir)/core
|
|
$(RMF) $(srcdir)/a.out
|
|
-if test $(srcdir) = .; then $(MAKE) realclean; fi
|
|
$(RMF) $(srcdir)/Makefile
|
|
|
|
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
|
|
|
distdir:
|
|
for I in $(DISTGNOME); do $(CP) $(srcdir)/$$I $(distdir); done
|
|
|
|
install: install_@mx@
|
|
|
|
install_:
|
|
|
|
install_mx: all
|
|
$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
|
|
$(MKINSTALLDIRS) $(DESTDIR)$(icondir)
|
|
$(MKINSTALLDIRS) $(DESTDIR)$(mclibdir)
|
|
$(MKINSTALLDIRS) $(DESTDIR)$(datadir)/mime-info
|
|
$(MKINSTALLDIRS) $(DESTDIR)$(corbadir)
|
|
$(MKINSTALLDIRS) $(DESTDIR)$(gnewdir)
|
|
$(INSTALL_PROGRAM) plain-gmc $(DESTDIR)$(bindir)/$(binprefix)plain-gmc
|
|
$(INSTALL_PROGRAM) corba-gmc $(DESTDIR)$(bindir)/$(binprefix)gmc
|
|
$(INSTALL_PROGRAM) gmc-client $(DESTDIR)$(bindir)/$(binprefix)gmc-client
|
|
for I in $(ICONS); \
|
|
do $(INSTALL_DATA) $(srcdir)/$$I $(DESTDIR)$(icondir)/$$I; done
|
|
$(INSTALL_DATA) $(srcdir)/layout $(DESTDIR)$(mclibdir)/layout
|
|
$(INSTALL_DATA) mc.keys $(DESTDIR)$(datadir)/mime-info
|
|
$(INSTALL_DATA) $(srcdir)/gmc.gnorba $(DESTDIR)$(corbadir)
|
|
|
|
uninstall:
|
|
$(RMF) $(DESTDIR)$(bindir)/$(binprefix)gmc
|
|
$(RMF) $(DESTDIR)$(bindir)/$(binprefix)gmc-client
|
|
$(RMF) $(DESTDIR)$(bindir)/$(binprefix)plain-gmc
|
|
for I in $(ICONS); \
|
|
do $(RMF) $(DESTDIR)$(icondir)/$$I; done
|
|
-rmdir $(DESTDIR)$(icondir)
|
|
$(RMF) $(DESTDIR)$(mclibdir)/layout
|
|
$(RMF) $(DESTDIR)$(datadir)/mime-info/mc.keys
|
|
-rmdir $(DESTDIR)$(datadir)/mime-info
|
|
-rmdir $(DESTDIR)$(gnewdir)
|
|
$(RMF) $(DESTDIR)$(corbadir)/gmc.gnorba
|
|
-rmdir $(DESTDIR)$(corbadir)
|
|
|
|
depend dep: @gmcdep@
|
|
|
|
gmcdep: checklinks mcdep
|
|
|
|
fastdeploc: @fastdepslang@ @fastdepvfs@
|
|
|
|
# ***Dependencies***Do not edit***
|
|
@DOTDEPEND@
|
|
# ***End of dependencies***
|