/[debian]/bti/branches/upstream/current/Makefile
ViewVC logotype

Diff of /bti/branches/upstream/current/Makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1650 by gregoa, Thu Mar 12 15:49:54 2009 UTC revision 1651 by gregoa, Tue Mar 24 18:01:39 2009 UTC
# Line 16  Line 16 
16  #  #
17  #  #
18    
19  VERSION = 015  VERSION = 017
20    
21  PROGRAM = bti  PROGRAM = bti
22    SCRIPTS = bti-shrink-urls
23    
24  CORE_OBJS = \  CORE_OBJS = \
25          bti.o          bti.o
# Line 35  LD = $(CROSS_COMPILE)gcc Line 36  LD = $(CROSS_COMPILE)gcc
36  AR = $(CROSS_COMPILE)ar  AR = $(CROSS_COMPILE)ar
37    
38  XML2_CFLAGS = `xml2-config --cflags`  XML2_CFLAGS = `xml2-config --cflags`
39  override CFLAGS += -g -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -O2 $(XML2_CFLAGS)  PCRE_CFLAGS = `pcre-config --cflags`
40    override CFLAGS += -g -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -O2 $(XML2_CFLAGS) $(PCRE_CFLAGS)
41    
42  WARNINGS        = -Wstrict-prototypes -Wsign-compare -Wshadow \  WARNINGS        = -Wstrict-prototypes -Wsign-compare -Wshadow \
43                    -Wchar-subscripts -Wmissing-declarations -Wnested-externs \                    -Wchar-subscripts -Wmissing-declarations -Wnested-externs \
# Line 43  WARNINGS       = -Wstrict-prototypes -Wsign-co Line 45  WARNINGS       = -Wstrict-prototypes -Wsign-co
45  CFLAGS          += $(WARNINGS)  CFLAGS          += $(WARNINGS)
46  LDFLAGS         += -Wl,-warn-common,--as-needed  LDFLAGS         += -Wl,-warn-common,--as-needed
47    
48    DEST            ?=
49    PREFIX          ?= /usr/local
50    
51    INSTALL         = install
52    INSTALL_BIN     = ${INSTALL} -m 0755 -t ${DEST}${PREFIX}/bin
53    INSTALL_MAN     = ${INSTALL} -m 0644 -t ${DEST}${PREFIX}/share/man
54    
55  ifeq ($(strip $(V)),)  ifeq ($(strip $(V)),)
56          E = @echo          E = @echo
# Line 62  export E Q Line 70  export E Q
70  #LIB_OBJS = -lcurl -lnsl -lssl -lcrypto  #LIB_OBJS = -lcurl -lnsl -lssl -lcrypto
71  LIB_OBJS = -lcurl -lnsl -lreadline  LIB_OBJS = -lcurl -lnsl -lreadline
72  LIB_XML2 = `xml2-config --libs`  LIB_XML2 = `xml2-config --libs`
73    LIB_PCRE = `pcre-config --libs`
74    
75  all:    $(PROGRAM) $(MAN_PAGES)  all:    $(PROGRAM) $(MAN_PAGES)
76    
77  # "Static Pattern Rule" to build all programs  # "Static Pattern Rule" to build all programs
78  bti: %: $(HEADERS) $(GEN_HEADERS) $(CORE_OBJS)  bti: %: $(HEADERS) $(GEN_HEADERS) $(CORE_OBJS)
79          $(E) "  LD      " $@          $(E) "  LD      " $@
80          $(Q) $(LD) $(LDFLAGS) $(CORE_OBJS) -o $@ $(LIB_OBJS) $(LIB_XML2)          $(Q) $(LD) $(LDFLAGS) $(CORE_OBJS) -o $@ $(LIB_OBJS) $(LIB_XML2) $(LIB_PCRE)
   
81    
82  # build the objects  # build the objects
83  %.o: %.c $(HEADERS) $(GEN_HEADERS)  %.o: %.c $(HEADERS) $(GEN_HEADERS)
# Line 111  release: Line 119  release:
119          git archive --format=tar --prefix=bti-$(VERSION)/ HEAD | gzip -9v > bti-$(VERSION).tar.gz          git archive --format=tar --prefix=bti-$(VERSION)/ HEAD | gzip -9v > bti-$(VERSION).tar.gz
120  .PHONY: release  .PHONY: release
121    
122    install: all
123            $(E) "  INSTALL  " ${DEST}${PREFIX}
124            ${Q} ${INSTALL_BIN} ${PROGRAM} ${SCRIPTS}
125            ${Q} ${INSTALL_MAN} ${MAN_PAGES}
126    .PHONY: install

Legend:
Removed from v.1650  
changed lines
  Added in v.1651

  ViewVC Help
Powered by ViewVC 1.1.26