1 # 2 # epoll ( Efficent event polling implementation ) 3 # Copyright (C) 2001,...,2002 Davide Libenzi 4 # 5 # This program is free software; you can redistribute it and/or modify 6 # it under the terms of the GNU General Public License as published by 7 # the Free Software Foundation; either version 2 of the License, or 8 # (at your option) any later version. 9 # 10 # Davide Libenzi <davidel (at] xmailserver.org> 11 # 12 # 13 14 OUTDIR = ../bin 15 SRCDIR = . 16 INCLUDE = -I- -I. -I../include -I/usr/src/linux/include 17 LIBS = -L../lib -lepoll -lpcl 18 19 20 ifeq ($(EPOLLCFG), release) 21 CFLAGS = -O3 $(INCLUDE) -DUNIX 22 else 23 CFLAGS = -g $(INCLUDE) -DUNIX -D_DEBUG 24 endif 25 26 SOURCES = $(SRCDIR)/epoll-test.c 27 28 MKDEP = mkdep -f 29 30 31 all: blaster httpd pipetest 32 33 .depend: $(SOURCES) 34 $(MKDEP) $(CFLAGS) $(SOURCES) 35 36 blaster: $(SOURCES) 37 $(CC) $(CFLAGS) -DHTTP_BLASTER -o $(OUTDIR)/epoll-blaster $(SOURCES) $(LIBS) 38 39 httpd: $(SOURCES) 40 $(CC) $(CFLAGS) -DDPHTTPD -o $(OUTDIR)/epoll-httpd $(SOURCES) $(LIBS) 41 42 pipetest: $(SOURCES) 43 $(CC) $(CFLAGS) -DPIPETESTER -o $(OUTDIR)/epoll-pipetest $(SOURCES) $(LIBS) 44 45 distclean: clean 46 @rm -f .depend 47 48 clean: 49 @rm -f *~ $(OUTDIR)/epoll-blaster $(OUTDIR)/epoll-httpd $(OUTDIR)/epoll-pipetest 50 51 #include .depend 52 53