1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
|
# Other paths are relative to this.
PREFIX ?= /usr/local
# Where to install the executable.
BINPATH ?= $(PREFIX)/bin
# Where to install the icons.
# Used by icons/Makefile
export ICONPATH ?= $(PREFIX)/share/isomaster/icons
# Used by gettext and po/Makefile (translations)
# To disable installation of some .mo files edit or delete the MOFILES
# variable in po/Makefile. This is safe to do.
export LOCALEDIR ?= $(PREFIX)/share/locale
# Where to install the man page.
MYMANPATH ?= $(PREFIX)/share/man/man1
# Where to install the bkisofs docs
MYDOCPATH ?= $(PREFIX)/share/doc/bkisofs
# Where to install the .desktop file
DESKTOPPATH ?= $(PREFIX)/share/applications
# The default editor for files from the image. Users can change this. I
# recommend you set it to a graphical text editor that is likely to be
# installed by default on your distribution.
DEFAULT_EDITOR ?= mousepad
# The default viewer for files from the image. I recommend you make it
# a web browser because it can display the widest range of files.
DEFAULT_VIEWER ?= firefox
# To disable i18n completely, uncomment the following line
# or define WITHOUT_NLS somewhere else.
# This option is desired in the FreeBSD ports guidelines.
#WITHOUT_NLS = 1
# This enables overwriting the original iso,
# don't uncomment it unless you are willing to risk losing data.
#CPPFLAGS += -DENABLE_SAVE_OVERWRITE
# Define this on the command-line to use the system iniparser
#USE_SYSTEM_INIPARSER = 1
# programs used in the Makefiles:
export CC ?= gcc
export AR = ar
export RM = rm -f
export INSTALL = install
export CP = cp
export ECHO = echo
VERSION = 1.3.9
# -DDEBUG and -g only used during development
CFLAGS += -Wall -pedantic -std=gnu99 -Wundef -Wcast-align -W -Wpointer-arith -Wwrite-strings -Wno-unused-parameter `pkg-config --cflags gtk+-2.0`
ifndef WITHOUT_NLS
CFLAGS += -DENABLE_NLS
endif
CPPFLAGS += -DICONPATH=\"$(ICONPATH)\" -DLOCALEDIR=\"$(LOCALEDIR)\" -DDEFAULT_EDITOR=\"$(DEFAULT_EDITOR)\" -DDEFAULT_VIEWER=\"$(DEFAULT_VIEWER)\" -DVERSION=\"$(VERSION)\"
# the _FILE_OFFSET_BITS=64 is to enable stat() for large files on linuxish systems
CPPFLAGS += -D_FILE_OFFSET_BITS=64
ifdef USE_SYSTEM_INIPARSER
CPPFLAGS += -DUSE_SYSTEM_INIPARSER=$(USE_SYSTEM_INIPARSER)
endif
OBJECTS = isomaster.o window.o browser.o fsbrowser.o isobrowser.o error.o about.o settings.o boot.o editfile.o
all: translations isomaster.desktop isomaster
isomaster: $(OBJECTS) lib iniparser
@echo 'Linking isomaster'
ifndef USE_SYSTEM_INIPARSER
@$(CC) $(LDFLAGS) $(OBJECTS) bk/bk.a iniparser-2.17/libiniparser.a -o isomaster `pkg-config --libs gtk+-2.0`
else
@$(CC) $(LDFLAGS) $(OBJECTS) bk/bk.a -liniparser -o isomaster `pkg-config --libs gtk+-2.0`
endif
# static pattern rule
$(OBJECTS): %.o: %.c %.h bk/bk.h Makefile
@echo 'Compiling' $<
@$(CC) $(CFLAGS) $(CPPFLAGS) $< -c -o $@
lib:
cd bk && $(MAKE)
iniparser:
ifndef USE_SYSTEM_INIPARSER
cd iniparser-2.17 && $(MAKE)
else
@echo "Will use system iniparser";
endif
translations:
ifndef WITHOUT_NLS
cd po && $(MAKE)
endif
isomaster.desktop: isomaster.desktop.src
$(CP) isomaster.desktop.src isomaster.desktop
$(ECHO) Icon=$(ICONPATH)/isomaster.png >> isomaster.desktop
bk-doc:
cd bkisofs-manual && $(MAKE)
clean:
cd bk && $(MAKE) clean
cd iniparser-2.17 && $(MAKE) clean
ifndef WITHOUT_NLS
cd po && $(MAKE) clean
endif
$(RM) *.o isomaster isomaster.desktop
# for info about DESTDIR see http://www.gnu.org/prep/standards/html_node/DESTDIR.html
install: all
$(INSTALL) -d $(DESTDIR)$(BINPATH)
$(INSTALL) isomaster $(DESTDIR)$(BINPATH)
cd icons && $(MAKE) install
ifndef WITHOUT_NLS
cd po && $(MAKE) install
endif
$(INSTALL) -d $(DESTDIR)$(MYMANPATH)
$(INSTALL) -m 644 isomaster.1 $(DESTDIR)$(MYMANPATH)
$(INSTALL) -d $(DESTDIR)$(DESKTOPPATH)
$(INSTALL) -m 644 isomaster.desktop $(DESTDIR)$(DESKTOPPATH)
$(INSTALL) -d $(DESTDIR)$(MYDOCPATH)
for FILE in bkisofs-manual/*html; do \
$(INSTALL) -m 644 $$FILE $(DESTDIR)$(MYDOCPATH); \
done;
uninstall:
$(RM) -f $(DESTDIR)$(BINPATH)/isomaster
cd icons && $(MAKE) uninstall
ifndef WITHOUT_NLS
cd po && $(MAKE) uninstall
endif
$(RM) -f $(DESTDIR)$(MYMANPATH)/isomaster.1
$(RM) -f $(DESTDIR)$(DESKTOPPATH)/isomaster.desktop
$(RM) -rf $(DESTDIR)$(MYDOCPATH)
|