contrib / svn-fe / Makefileon commit Merge branch 'jk/rerere-forget-check-enabled' into maint (5c2e654)
   1all:: svn-fe$X
   2
   3CC = cc
   4RM = rm -f
   5MV = mv
   6
   7CFLAGS = -g -O2 -Wall
   8LDFLAGS =
   9EXTLIBS = -lz
  10
  11include ../../config.mak.uname
  12-include ../../config.mak.autogen
  13-include ../../config.mak
  14
  15ifeq ($(uname_S),Darwin)
  16        ifndef NO_FINK
  17                ifeq ($(shell test -d /sw/lib && echo y),y)
  18                        CFLAGS += -I/sw/include
  19                        LDFLAGS += -L/sw/lib
  20                endif
  21        endif
  22        ifndef NO_DARWIN_PORTS
  23                ifeq ($(shell test -d /opt/local/lib && echo y),y)
  24                        CFLAGS += -I/opt/local/include
  25                        LDFLAGS += -L/opt/local/lib
  26                endif
  27        endif
  28endif
  29
  30ifndef NO_OPENSSL
  31        EXTLIBS += -lssl
  32        ifdef NEEDS_CRYPTO_WITH_SSL
  33                EXTLIBS += -lcrypto
  34        endif
  35endif
  36
  37ifndef NO_PTHREADS
  38        CFLAGS += $(PTHREADS_CFLAGS)
  39        EXTLIBS += $(PTHREAD_LIBS)
  40endif
  41
  42ifdef HAVE_CLOCK_GETTIME
  43        CFLAGS += -DHAVE_CLOCK_GETTIME
  44        EXTLIBS += -lrt
  45endif
  46
  47ifdef NEEDS_LIBICONV
  48        EXTLIBS += -liconv
  49endif
  50
  51GIT_LIB = ../../libgit.a
  52VCSSVN_LIB = ../../vcs-svn/lib.a
  53XDIFF_LIB = ../../xdiff/lib.a
  54
  55LIBS = $(VCSSVN_LIB) $(GIT_LIB) $(XDIFF_LIB)
  56
  57QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir
  58QUIET_SUBDIR1 =
  59
  60ifneq ($(findstring $(MAKEFLAGS),w),w)
  61PRINT_DIR = --no-print-directory
  62else # "make -w"
  63NO_SUBDIR = :
  64endif
  65
  66ifneq ($(findstring $(MAKEFLAGS),s),s)
  67ifndef V
  68        QUIET_CC      = @echo '   ' CC $@;
  69        QUIET_LINK    = @echo '   ' LINK $@;
  70        QUIET_SUBDIR0 = +@subdir=
  71        QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo '   ' SUBDIR $$subdir; \
  72                        $(MAKE) $(PRINT_DIR) -C $$subdir
  73endif
  74endif
  75
  76svn-fe$X: svn-fe.o $(VCSSVN_LIB) $(XDIFF_LIB) $(GIT_LIB)
  77        $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(EXTLIBS) -o $@ svn-fe.o $(LIBS)
  78
  79svn-fe.o: svn-fe.c ../../vcs-svn/svndump.h
  80        $(QUIET_CC)$(CC) $(CFLAGS) -I../../vcs-svn -o $*.o -c $<
  81
  82svn-fe.html: svn-fe.txt
  83        $(QUIET_SUBDIR0)../../Documentation $(QUIET_SUBDIR1) \
  84                MAN_TXT=../contrib/svn-fe/svn-fe.txt \
  85                ../contrib/svn-fe/$@
  86
  87svn-fe.1: svn-fe.txt
  88        $(QUIET_SUBDIR0)../../Documentation $(QUIET_SUBDIR1) \
  89                MAN_TXT=../contrib/svn-fe/svn-fe.txt \
  90                ../contrib/svn-fe/$@
  91        $(MV) ../../Documentation/svn-fe.1 .
  92
  93../../vcs-svn/lib.a: FORCE
  94        $(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) vcs-svn/lib.a
  95
  96../../xdiff/lib.a: FORCE
  97        $(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) xdiff/lib.a
  98
  99../../libgit.a: FORCE
 100        $(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) libgit.a
 101
 102clean:
 103        $(RM) svn-fe$X svn-fe.o svn-fe.html svn-fe.xml svn-fe.1
 104
 105.PHONY: all clean FORCE