w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

Makefile.in (8860B)


      1 #
      2 # Makefile
      3 # @configure_input@
      4 #
      5 @SET_MAKE@
      6 SHELL=@SHELL@
      7 PACKAGE = @PACKAGE@
      8 VERSION = @VERSION@
      9 DOMAIN = $(PACKAGE)
     10 prefix = @prefix@
     11 exec_prefix = @exec_prefix@
     12 datarootdir = @datarootdir@
     13 bindir = @bindir@
     14 datadir = @datadir@
     15 localedir = $(datadir)/locale
     16 libdir = @libdir@
     17 includedir = @includedir@
     18 infodir = @infodir@
     19 libexecdir = @libexecdir@
     20 localstatedir = @localstatedir@
     21 mandir = @mandir@
     22 oldincludedir = @oldincludedir@
     23 sbindir = @sbindir@
     24 sharedstatedir = @sharedstatedir@
     25 srcdir = @srcdir@
     26 sysconfdir = @sysconfdir@
     27 top_srcdir = @top_srcdir@
     28 top_builddir = .
     29 VPATH = $(top_srcdir):.
     30 
     31 CGIBIN_DIR = $(libexecdir)/$(PACKAGE)/cgi-bin
     32 AUXBIN_DIR = $(libexecdir)/$(PACKAGE)
     33 HELP_DIR = @HELP_DIR@
     34 RC_DIR = @RC_DIR@
     35 ETC_DIR = $(sysconfdir)
     36 CONF_DIR = $(sysconfdir)/$(PACKAGE)
     37 
     38 CFLAGS = $(OPTS) -I. -I$(top_srcdir) @CFLAGS@ $(CPPFLAGS) $(DEFS)
     39 WCCFLAGS = @WCCFLAGS@
     40 CPPFLAGS = @CPPFLAGS@
     41 DEFS = @DEFS@ -DAUXBIN_DIR=\"$(AUXBIN_DIR)\" \
     42 	-DCGIBIN_DIR=\"$(CGIBIN_DIR)\" -DHELP_DIR=\"$(HELP_DIR)\" \
     43 	-DETC_DIR=\"$(ETC_DIR)\" -DCONF_DIR=\"$(CONF_DIR)\" \
     44 	-DRC_DIR=\"$(RC_DIR)\" \
     45         -DLOCALEDIR=\"$(localedir)\"
     46 LDFLAGS = @LDFLAGS@
     47 LIBS = @LIBS@
     48 GC_LIBS = @LIBGC@
     49 EXT_LIBS = -L. -lindep @LIBINTL@ $(GC_LIBS)
     50 W3M_LIBS = @W3M_LIBS@
     51 WCTARGET = @WCTARGET@
     52 NLSTARGET = @NLSTARGET@
     53 
     54 MAKE_ARGS = PERL='$(PERL)' MKDIR='$(MKDIR)' \
     55 	BIN_DIR='$(bindir)' AUXBIN_DIR='$(AUXBIN_DIR)' \
     56 	CGIBIN_DIR='$(CGIBIN_DIR)' \
     57 	HELP_DIR='$(HELP_DIR)' MAN_DIR='$(mandir)' ETC_DIR='$(ETC_DIR)' \
     58 	CONF_DIR='$(CONF_DIR)' \
     59 	RC_DIR='$(RC_DIR)' DESTDIR='$(DESTDIR)' KEYBIND_SRC='$(KEYBIND_SRC)'
     60 
     61 IMGCFLAGS = @IMGX11CFLAGS@ @IMGFBCFLAGS@ @IMGWINCFLAGS@
     62 IMGLDFLAGS = @IMGX11LDFLAGS@ @IMGFBLDFLAGS@ @IMGWINLDFLAGS@
     63 
     64 CC0 = @CC@
     65 CXX = @CXX@
     66 IMGLINK = @IMGLINK@
     67 CC = @POSUBST@ $(CC0)
     68 CPP = @CPP@
     69 RANLIB=@RANLIB@
     70 AWK = @AWK@
     71 PERL = @PERL@
     72 MKDIR=mkdir -p
     73 MV=mv
     74 RM=rm
     75 AR=ar
     76 INSTALL=@INSTALL@
     77 INSTALL_PROGRAM=@INSTALL_PROGRAM@
     78 INSTALL_SCRIPT=@INSTALL_SCRIPT@
     79 INSTALL_DATA=@INSTALL_DATA@
     80 INSTALL_W3MIMGDISPLAY=@INSTALL_W3MIMGDISPLAY@
     81 
     82 HELP_FILE = @HELP_FILE@
     83 KEYBIND_SRC = @KEYMAP_FILE@.c
     84 KEYBIND_OBJ = @KEYMAP_FILE@.o
     85 
     86 VERSION=@CURRENT_VERSION@
     87 MODEL=@W3M_TARGET@-@W3M_LANG@
     88 
     89 SRCS=main.c file.c buffer.c display.c etc.c search.c linein.c table.c local.c \
     90 	form.c map.c frame.c rc.c menu.c mailcap.c image.c \
     91 	symbol.c entity.c terms.c url.c ftp.c mimehead.c regex.c news.c \
     92 	func.c cookie.c history.c backend.c $(KEYBIND_SRC)
     93 OBJS=main.o file.o buffer.o display.o etc.o search.o linein.o table.o local.o\
     94 	form.o map.o frame.o rc.o menu.o mailcap.o image.o \
     95 	symbol.o entity.o terms.o url.o ftp.o mimehead.o regex.o news.o \
     96 	func.o cookie.o history.o backend.o $(KEYBIND_OBJ)
     97 LSRCS=anchor.c parsetagx.c tagtable.c istream.c
     98 LOBJS=anchor.o parsetagx.o tagtable.o istream.o
     99 LLOBJS=version.o
    100 ALIBOBJS=Str.o indep.o regex.o textlist.o parsetag.o myctype.o hash.o
    101 ALIB=libindep.a
    102 ALLOBJS=$(OBJS) $(LOBJS) $(LLOBJS)
    103 
    104 EXT=@EXEEXT@
    105 
    106 TARGET=$(PACKAGE)$(EXT)
    107 BOOKMARKER=w3mbookmark$(EXT)
    108 HELPER=w3mhelperpanel$(EXT)
    109 INFLATE=inflate$(EXT)
    110 IMGDISPLAY=w3mimgdisplay$(EXT)
    111 MAN1_TARGET=$(PACKAGE).1
    112 MAN1=$(top_srcdir)/doc/w3m.1
    113 MAN1_JA=$(top_srcdir)/doc-jp/w3m.1
    114 
    115 LIB_TARGETS=$(BOOKMARKER) $(HELPER)
    116 AUXBIN_TARGETS=@AUXBIN_TARGETS@
    117 TARGETS=$(TARGET) $(LIB_TARGETS) $(AUXBIN_TARGETS)
    118 HELP_TARGET=w3mhelp.html
    119 HELP_ALLFILES=w3mhelp-w3m_en.html w3mhelp-w3m_ja.html \
    120 	w3mhelp-lynx_en.html w3mhelp-lynx_ja.html
    121 
    122 DEFUNS=$(top_srcdir)/main.c $(top_srcdir)/menu.c
    123 SCRIPTSUBDIRS= scripts
    124 SUBDIRS = $(SCRIPTSUBDIRS) w3mimg libwc po
    125 .PHONY: $(SUBDIRS)
    126 
    127 all: $(TARGETS) all-scripts $(NLSTARGET)
    128 
    129 $(TARGET): $(ALLOBJS) $(ALIB) $(WCTARGET)
    130 	$(CC) $(CFLAGS) -o $(TARGET) $(ALLOBJS) $(LDFLAGS) $(LIBS) $(EXT_LIBS) $(W3M_LIBS)
    131 
    132 $(ALIB): $(ALIBOBJS)
    133 	$(AR) rv $(ALIB) $(ALIBOBJS)
    134 	$(RANLIB) $(ALIB)
    135 
    136 $(OBJS) $(LOBJS): fm.h funcname1.h
    137 
    138 tagtable.c: tagtable.tab mktable$(EXT) html.h 
    139 	./mktable$(EXT) 100 $(srcdir)/tagtable.tab > $@
    140 
    141 entity.h: entity.tab mktable$(EXT)
    142 	echo '/* $$I''d$$ */' > $@
    143 	./mktable$(EXT) 100 $(srcdir)/entity.tab >> $@
    144 
    145 indep.o: indep.c fm.h funcname1.h entity.h
    146 func.o: funcname.c functable.c funcname1.h
    147 keybind.o: funcname2.h
    148 keybind_lynx.o: funcname2.h
    149 parsetagx.o: html.c
    150 
    151 funcname.tab: $(DEFUNS)
    152 	(echo '#define DEFUN(x,y,z) x y';\
    153 	 sed -ne '/^DEFUN/{p;n;/^[ 	]/p;}' $(DEFUNS)) | $(CPP) - | \
    154 	 awk '$$1 ~ /^[_A-Za-z]/ { \
    155 	       for (i=2;i<=NF;i++) { print $$i, $$1} \
    156 	 }' > $@.tmp
    157 	@if cmp -s $@.tmp $@; then \
    158 		echo "$@ unchanged"; \
    159 		rm -f $@.tmp; \
    160 	else \
    161 		echo "$@ updated"; \
    162 		mv $@.tmp $@; \
    163 	fi
    164 
    165 funcname.c: funcname.tab
    166 	sort funcname.tab | $(AWK) -f $(top_srcdir)/funcname0.awk > $@
    167 
    168 funcname1.h: funcname.tab
    169 	sort funcname.tab | $(AWK) -f $(top_srcdir)/funcname1.awk > $@
    170 
    171 funcname2.h: funcname.tab
    172 	sort funcname.tab | $(AWK) -f $(top_srcdir)/funcname2.awk > $@
    173 
    174 functable.c: funcname.tab mktable$(EXT)
    175 	sort funcname.tab | $(AWK) -f $(top_srcdir)/functable.awk > functable.tab
    176 	./mktable$(EXT) 100 functable.tab > $@
    177 	-rm -f functable.tab
    178 
    179 mktable$(EXT): mktable.o dummy.o Str.o hash.o myctype.o
    180 	$(CC) $(CFLAGS) -o mktable mktable.o dummy.o Str.o hash.o myctype.o $(LDFLAGS) $(LIBS) $(GC_LIBS)
    181 
    182 $(BOOKMARKER): w3mbookmark.o dummy.o $(ALIB)
    183 	$(CC) $(CFLAGS) -o $(BOOKMARKER) w3mbookmark.o dummy.o $(LDFLAGS) $(LIBS) $(EXT_LIBS)
    184 
    185 $(HELPER): w3mhelperpanel.o dummy.o $(ALIB)
    186 	$(CC) $(CFLAGS) -o $(HELPER) w3mhelperpanel.o dummy.o $(LDFLAGS) $(LIBS) $(EXT_LIBS)
    187 
    188 $(INFLATE): inflate.o $(ALIB)
    189 	$(CC) $(CFLAGS) -o $(INFLATE) inflate.o $(LDFLAGS) $(LIBS) -lz
    190 
    191 inflate.o: inflate.c
    192 	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/inflate.c
    193 
    194 libwc/libwc.a: libwc
    195 libwc:
    196 	(cd libwc && $(MAKE) CC='$(CC0)' OPTS='$(OPTS)')
    197  
    198 dummy.o: entity.c
    199 	$(CC) $(CFLAGS) -DDUMMY -c -o $@ $?
    200 
    201 $(IMGDISPLAY): w3mimgdisplay.o $(ALIB) w3mimg/w3mimg.a
    202 	$(IMGLINK) $(CFLAGS) -o $(IMGDISPLAY) w3mimgdisplay.o w3mimg/w3mimg.a $(LDFLAGS) $(LIBS) $(IMGLDFLAGS)
    203 
    204 w3mimgdisplay.o: w3mimgdisplay.c w3mimg/w3mimg.h
    205 	$(CC) $(CFLAGS) $(IMGCFLAGS) -o $@ -c $(srcdir)/w3mimgdisplay.c
    206 
    207 w3mimg/w3mimg.a: w3mimg
    208 w3mimg:
    209 	(cd w3mimg && $(MAKE) CC="$(CC0)" OPTS="$(OPTS)")
    210 
    211 po:
    212 	(cd $@ && $(MAKE))
    213 
    214 install: install-core install-scripts install-po
    215 
    216 install-core: $(TARGETS)
    217 	-$(MKDIR) $(DESTDIR)$(bindir)
    218 	-$(MKDIR) $(DESTDIR)$(AUXBIN_DIR)
    219 	-$(MKDIR) $(DESTDIR)$(CGIBIN_DIR)
    220 	-$(MKDIR) $(DESTDIR)$(HELP_DIR)
    221 	-$(MKDIR) $(DESTDIR)$(mandir)/man1
    222 	-$(MKDIR) $(DESTDIR)$(mandir)/ja/man1
    223 	$(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(bindir)/$(TARGET)
    224 	$(INSTALL_DATA) $(HELP_FILE) $(DESTDIR)$(HELP_DIR)/$(HELP_TARGET)
    225 	$(INSTALL_DATA) $(MAN1) $(DESTDIR)$(mandir)/man1/$(MAN1_TARGET)
    226 	$(INSTALL_DATA) $(MAN1_JA) $(DESTDIR)$(mandir)/ja/man1/$(MAN1_TARGET)
    227 	targets="$(AUXBIN_TARGETS)"; for file in $$targets; \
    228 	do \
    229 		case $$file in \
    230 		$(IMGDISPLAY)) $(INSTALL_W3MIMGDISPLAY) $$file \
    231 			$(DESTDIR)$(AUXBIN_DIR)/$$file;; \
    232 		*) $(INSTALL_PROGRAM) $$file $(DESTDIR)$(AUXBIN_DIR)/$$file;; \
    233 		esac; \
    234 	done
    235 	for file in $(LIB_TARGETS); \
    236 	do \
    237 		$(INSTALL_PROGRAM) $$file $(DESTDIR)$(CGIBIN_DIR)/$$file; \
    238 	done
    239 
    240 install-helpfile:
    241 	-$(MKDIR) $(DESTDIR)$(HELP_DIR)
    242 	for file in $(HELP_ALLFILES); \
    243 	do \
    244 		$(INSTALL_DATA) $$file $(DESTDIR)$(HELP_DIR)/$$file; \
    245 	done
    246 
    247 install-po:
    248 	NLSTARGET="$(NLSTARGET)"; for subdir in $$NLSTARGET; \
    249 	do \
    250 	 (cd $$subdir && $(MAKE) install); \
    251 	done
    252 
    253 all-scripts:
    254 	for dir in $(SCRIPTSUBDIRS);	\
    255 	do	\
    256 		(cd $$dir && $(MAKE) $(MAKE_ARGS)); \
    257 	done
    258 
    259 install-scripts: all-scripts
    260 	topdir=`pwd`; \
    261 	for dir in $(SCRIPTSUBDIRS);	\
    262 	do	\
    263 		(cd $$dir && $(MAKE) $(MAKE_ARGS) install); \
    264 	done
    265 
    266 uninstall:
    267 	-$(RM) $(bindir)/$(TARGET)
    268 	-for file in $(AUXBIN_TARGETS); \
    269 	do \
    270 		$(RM) -f $(AUXBIN_DIR)/$$file; \
    271 	done
    272 	-for file in $(LIB_TARGETS); \
    273 	do \
    274 		$(RM) -f $(CGIBIN_DIR)/$$file; \
    275 	done
    276 	-for file in $(HELP_ALLFILES); \
    277 	do \
    278 		$(RM) -f $(HELP_DIR)/$$file; \
    279 	done
    280 	-$(RM) -f $(HELP_DIR)/$(HELP_TARGET)
    281 	-$(RM) -f $(mandir)/man1/$(MAN1_TARGET)
    282 	-$(RM) -f $(mandir)/ja/man1/$(MAN1_TARGET)
    283 	-for dir in $(SCRIPTSUBDIRS);	\
    284 	do	\
    285 		(cd $$dir && $(MAKE) $(MAKE_ARGS) uninstall); \
    286 	done
    287 
    288 clean: sweep
    289 	-$(RM) -f *.o *.a $(TARGETS) mktable$(EXT)
    290 	-$(RM) -f funcname.tab
    291 	-$(RM) -f funcname.c funcname1.h funcname2.h tagtable.c functable.c
    292 	-for dir in w3mimg libwc; \
    293 	do \
    294 		(cd $$dir && $(MAKE) clean RM="$(RM)"); \
    295 	done
    296 	-for dir in $(SCRIPTSUBDIRS);	\
    297 	do	\
    298 		(cd $$dir && $(MAKE) clean); \
    299 	done
    300 
    301 distclean: clean
    302 	for subdir in po scripts w3mimg libwc; \
    303 	do \
    304 		(cd $$subdir && $(MAKE) distclean); \
    305 	done
    306 	-$(RM) -f config.cache config.log config.status
    307 	-$(RM) -f w3mhelp-w3m_en.html w3mhelp-w3m_ja.html
    308 	-$(RM) -f w3mhelp-lynx_en.html w3mhelp-lynx_ja.html
    309 	-$(RM) -f version.c
    310 	-$(RM) -f posubst
    311 	-$(RM) -f config.h Makefile
    312 	-$(RM) -f *core
    313 
    314 sweep:
    315 	-$(RM) -f core *~ *.bak *.orig *.rej
    316 
    317 depend: 
    318 	makedepend $(CFLAGS) *.c
    319 
    320 dist:
    321 	cd ..; tar cvfz w3m-$(VERSION).tar.gz w3m
    322 
    323 bindist:
    324 	cd ..; tar cvfz w3m-$(VERSION)-$(MODEL).tar.gz w3m/w3m* w3m/doc* w3m/Bonus* w3m/README w3m/scripts 
    325