From: teodor Date: Wed, 25 Oct 2006 15:16:37 +0000 (+0000) Subject: Automate CFLAGS X-Git-Url: http://sigaev.ru/git/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=926940cac3a5b49bc7a0175e4ce47d22242b2e45;p=tedtools.git Automate CFLAGS --- diff --git a/Makefile b/Makefile index 6fc788f..32122d4 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,20 @@ RANLIB=ranlib LD=ld -x -shared INCLUDE=-I. -#LINUX_CFLAGS=-D_GNU_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -CFLAGS=-Wall -g -O2 -pedantic -ansi -DASSERT_CORE -DHAVE_POLL_H -DHAVE_SYS_POLL_H -DHAVE_HSTRERROR $(LINUX_CFLAGS) +CFLAGS=-Wall -g -O2 -pedantic -ansi -DASSERT_CORE -DHAVE_POLL_H -DHAVE_HSTRERROR + +ifndef OS +OS=$(shell uname) +endif + +ifeq ($(OS), FreeBSD) +CFLAGS+= -DHAVE_POLL_H +endif + +ifeq ($(OS), Linux) +CFLAGS+= -DHAVE_SYS_POLL_H -D_GNU_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 +endif + LIB=-g -L. -ltedtools -lm OBJS=tlog.o tmalloc.o tools.o prs_hmap.o sfxstr.o \