From 926940cac3a5b49bc7a0175e4ce47d22242b2e45 Mon Sep 17 00:00:00 2001 From: teodor Date: Wed, 25 Oct 2006 15:16:37 +0000 Subject: [PATCH] Automate CFLAGS --- Makefile | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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 \ -- 2.46.1