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@xmailserver.org> 11# 12# 13 14OUTDIR = ../bin 15SRCDIR = . 16INCLUDE = -I- -I. -I../include -I/usr/src/linux/include 17LIBS = -L../lib -lepoll -lpcl 18 19 20ifeq ($(EPOLLCFG), release) 21CFLAGS = -O3 $(INCLUDE) -DUNIX 22else 23CFLAGS = -g $(INCLUDE) -DUNIX -D_DEBUG 24endif 25 26SOURCES = $(SRCDIR)/epoll-test.c 27 28MKDEP = mkdep -f 29 30 31all: blaster httpd pipetest 32 33.depend: $(SOURCES) 34 $(MKDEP) $(CFLAGS) $(SOURCES) 35 36blaster: $(SOURCES) 37 $(CC) $(CFLAGS) -DHTTP_BLASTER -o $(OUTDIR)/epoll-blaster $(SOURCES) $(LIBS) 38 39httpd: $(SOURCES) 40 $(CC) $(CFLAGS) -DDPHTTPD -o $(OUTDIR)/epoll-httpd $(SOURCES) $(LIBS) 41 42pipetest: $(SOURCES) 43 $(CC) $(CFLAGS) -DPIPETESTER -o $(OUTDIR)/epoll-pipetest $(SOURCES) $(LIBS) 44 45distclean: clean 46 @rm -f .depend 47 48clean: 49 @rm -f *~ $(OUTDIR)/epoll-blaster $(OUTDIR)/epoll-httpd $(OUTDIR)/epoll-pipetest 50 51#include .depend 52 53