123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- .POSIX:
- DC=@DC@
- DFLAGS=@DFLAGS@
- LDFLAGS=@LDFLAGS@
- LIBS=@LIBS@
- prefix=@prefix@
- bindir=@bindir@
- datadir=@datadir@
- mandir=@mandir@
- oflag=@oflag@
- INSTALL=install
- INSTALL_PROGRAM=$(INSTALL)
- INSTALL_DATA=$(INSTALL) -m644
- PDOWN_SOURCES=source/app.d \
- source/configuration.d \
- source/logger.d \
- source/pd_version.d \
- source/pixiv.d \
- source/pixiv_downloader.d \
- source/term.d \
- source/util.d \
- source/cmds/artist.d \
- source/cmds/artwork.d \
- source/cmds/bookmarked.d \
- source/cmds/compact.d \
- source/cmds/daily.d \
- source/cmds/following.d \
- source/cmds/novel.d \
- source/cmds/package.d \
- source/cmds/prune.d \
- source/gif_writer/common.d \
- source/gif_writer/osx.d \
- source/gif_writer/package.d \
- source/gif_writer/posix.d \
- source/image_reader/osx.d \
- source/image_reader/package.d \
- source/image_reader/posix.d \
- source/mlib/configparser.d \
- source/mlib/directories.d \
- source/mlib/search_params.d \
- source/mlib/trash.d
- PDOWN_VERSION_FILE=source/res/VERSION
- all: make-tag pixiv_down
- # This allows us to only build pixiv_down if the githash has
- # changed or one of the files in PDOWN_SOURCES is modified.
- make-tag:
- @if [ -d .git -a -x "$$(which git)" ]; then \
- if [ -r $(PDOWN_VERSION_FILE) ]; then \
- prevhash=$$(pr -t $(PDOWN_VERSION_FILE)) ; \
- currhash=$$(git describe --tags) ; \
- if [ $$prevhash != $$currhash ]; then \
- git describe --tags > $(PDOWN_VERSION_FILE) ; \
- fi ; \
- fi ; \
- fi
- $(PDOWN_VERSION_FILE):
- @test -d source/res || mkdir source/res
- @if [ -d .git -a -x "$$(which git)" ]; then \
- git describe --tags > $(PDOWN_VERSION_FILE) ; \
- else \
- pr -t VERSION > $(PDOWN_VERSION_FILE) ; \
- fi
- clean:
- rm -rf pixiv_down \
- objs/
- distclean: clean
- rm -rf Makefile
- install: pixiv_down
- $(INSTALL_PROGRAM) pixiv_down $(bindir)
- $(INSTALL_DATA) docs/pixiv_down.1 \
- docs/pixiv_down-artist.1 \
- docs/pixiv_down-artwork.1 \
- docs/pixiv_down-bookmarked.1 \
- docs/pixiv_down-compact.1 \
- docs/pixiv_down-daily.1 \
- docs/pixiv_down-following.1 \
- docs/pixiv_down-novel.1 \
- docs/pixiv_down-prune.1 \
- $(mandir)/man1
- $(INSTALL_DATA) docs/pixiv_down.conf.5 \
- $(mandir)/man5
- install-strip:
- $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
- uninstall:
- rm ${bindir}/pixiv_down
- pixiv_down: $(PDOWN_VERSION_FILE) $(PDOWN_SOURCES)
- $(DC) $(DFLAGS) ${oflag}pixiv_down $(PDOWN_SOURCES) $(LDFLAGS) $(LIBS)
|