blob: e0d65d1b86043af8db2fb1654dbbea4bdc18b2c1 [file] [log] [blame]
willy tarreau0f7af912005-12-17 12:21:26 +01001CC = gcc
2LD = gcc
3
willy tarreau9da061b2005-12-17 12:29:56 +01004# This is for Linux 2.4
5COPTS.linux = -O2
6LIBS.linux =
willy tarreau0f7af912005-12-17 12:21:26 +01007
willy tarreau9da061b2005-12-17 12:29:56 +01008# This is for solaris 8
9COPTS.solaris = -O2 -fomit-frame-pointer -DSOLARIS -DHAVE_STRLCPY
10LIBS.solaris = -lnsl -lsocket
11
12# Select target OS. TARGET must match a system for which COPTS and LIBS are
13# correctly defined above.
14TARGET = linux
15#TARGET = solaris
16
17DEBUG =
18#DEBUG = -g
19
20COPTS=$(COPTS.$(TARGET))
21LIBS=$(LIBS.$(TARGET))
willy tarreau0f7af912005-12-17 12:21:26 +010022
willy tarreau9da061b2005-12-17 12:29:56 +010023CFLAGS = -Wall $(COPTS) -DSTATTIME=0
willy tarreau0f7af912005-12-17 12:21:26 +010024LDFLAGS = -g
25
26all: haproxy
27
28haproxy: haproxy.o
29 $(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
30
31%.o: %.c
32 $(CC) $(CFLAGS) -c -o $@ $<
33
34clean:
35 rm -vf *.[oas] *~ core haproxy test nohup.out gmon.out