~ubuntu-branches/ubuntu/intrepid/haproxy/intrepid

« back to all changes in this revision

Viewing changes to Makefile.osx

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Cornet
  • Date: 2008-03-09 21:30:29 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080309213029-8oupnrc607mg5uqw
Tags: 1.3.14.3-1
* New Upstream Version
* Add status argument support to init-script to conform to LSB.
* Cleanup pidfile after stop in init script. Init script return code fixups.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# This makefile is dedicated to darwin (and possibly other BSDs)
2
2
# You should use it this way :
3
3
#   make TARGET=os CPU=cpu
4
 
 
5
 
VERSION := 1.3.12
 
4
#
 
5
# Some optional components may be added, such as DLMALLOC :
 
6
#
 
7
#   make DLMALLOC_SRC=/usr/local/src/dlmalloc.c \
 
8
#        OPT_OBJS=src/dlmalloc.o
6
9
 
7
10
# Select target OS. TARGET must match a system for which COPTS and LIBS are
8
11
# correctly defined below.
71
74
# - use -DTPROXY to compile with transparent proxy support.
72
75
DEFINE = -DTPROXY 
73
76
 
 
77
# May be changed to patch PAGE_SIZE on every platform when using dlmalloc
 
78
DLMALLOC_THRES=4096
 
79
 
74
80
# global options
75
81
TARGET_OPTS=$(COPTS.$(TARGET))
76
82
REGEX_OPTS=$(COPTS.$(REGEX))
77
83
CPU_OPTS=$(COPTS.$(CPU))
78
84
 
79
 
COPTS=-Iinclude $(ADDINC) $(CPU_OPTS) $(TARGET_OPTS) $(REGEX_OPTS) $(SMALL_OPTS) $(DEFINE)
80
 
LIBS=$(LIBS.$(TARGET)) $(LIBS.$(REGEX)) $(ADDLIB)
81
 
 
82
 
CFLAGS = -Wall $(COPTS) $(DEBUG) -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386
83
 
LDFLAGS = -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386
84
 
 
85
 
OBJS = src/haproxy.o src/sessionhash.o src/base64.o \
 
85
VERSION != cat VERSION 2>/dev/null || touch VERSION
 
86
SUBVERS != cat SUBVERS 2>/dev/null || touch SUBVERS
 
87
VERDATE != cat VERDATE 2>/dev/null || touch VERDATE
 
88
 
 
89
VER_OPTS := -DCONFIG_HAPROXY_VERSION=\"$(VERSION)$(SUBVERS)\" \
 
90
            -DCONFIG_HAPROXY_DATE=\"$(VERDATE)\"
 
91
 
 
92
COPTS   = -Iinclude $(ADDINC) $(CPU_OPTS) $(TARGET_OPTS) $(REGEX_OPTS) \
 
93
          $(SMALL_OPTS) $(VER_OPTS) $(DEFINE)
 
94
LIBS    = $(LIBS.$(TARGET)) $(LIBS.$(REGEX)) $(ADDLIB)
 
95
CFLAGS  = -Wall $(COPTS) $(DEBUG) -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -mmacosx-version-min=10.4
 
96
LDFLAGS = -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -mmacosx-version-min=10.4
 
97
 
 
98
OBJS = src/haproxy.o src/sessionhash.o src/base64.o src/protocols.o \
86
99
       src/uri_auth.o src/standard.o src/buffers.o src/log.o src/task.o \
87
100
       src/time.o src/fd.o src/regex.o src/cfgparse.o src/server.o \
88
 
       src/checks.o src/queue.o src/client.o src/proxy.o \
 
101
       src/checks.o src/queue.o src/client.o src/proxy.o src/proto_uxst.o \
89
102
       src/proto_http.o src/stream_sock.o src/appsession.o src/backend.o \
90
 
       src/session.o src/hdr_idx.o src/ev_select.o src/ev_poll.o src/acl.o \
91
 
       src/memory.o
 
103
       src/senddata.o src/dumpstats.o src/proto_tcp.o \
 
104
       src/session.o src/hdr_idx.o src/ev_select.o \
 
105
       src/ev_poll.o \
 
106
       src/acl.o src/memory.o \
 
107
       src/ebtree.o src/eb32tree.o
92
108
 
93
109
all: haproxy
94
110
 
100
116
.c.o:
101
117
        $(CC) $(CFLAGS) -c -o $@ $<
102
118
 
 
119
src/haproxy.o: src/haproxy.c
 
120
        $(CC) $(CFLAGS) -DBUILD_TARGET='"$(TARGET)"' -DBUILD_CC='"$(CC)"' \
 
121
                        -DBUILD_CPU='"$(CPU)"' -DBUILD_REGEX='"$(REGEX)"' \
 
122
                        -DBUILD_OPTS='"$(COPTS)"' -c -o $@ $<
 
123
 
 
124
src/dlmalloc.o: $(DLMALLOC_SRC)
 
125
        $(CC) $(CFLAGS) -DDEFAULT_MMAP_THRESHOLD=$(DLMALLOC_THRES) -c -o $@ $<
 
126
 
103
127
clean:
104
128
        rm -f *.[oas] src/*.[oas] core haproxy test
105
129
        for dir in . src include/* doc; do rm -f $$dir/*~ $$dir/*.rej;done
106
130
        rm -f haproxy-$(VERSION).tar.gz haproxy-$(VERSION) nohup.out gmon.out
 
131
 
 
132
version:
 
133
        @echo "VERSION: $(VERSION)"
 
134
        @echo "SUBVERS: $(SUBVERS)"
 
135
        @echo "VERDATE: $(VERDATE)"