From 5290be1ae541c9bb13441e3dd267f424d966c68a Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Mon, 16 Sep 2019 17:01:44 +0200 Subject: [PATCH] Add optimization & fix portability issues on SunOS --- src/Makefile | 2 +- test/Makefile | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/Makefile b/src/Makefile index 0ba3d4e..7da086b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -7,7 +7,7 @@ #LIBS= CC=gcc -CFLAGS=-ggdb -Wall +CFLAGS=-ggdb -Wall -O2 #-O2 #LIBS=-lrt #-verbose diff --git a/test/Makefile b/test/Makefile index d4233ac..31c43d6 100644 --- a/test/Makefile +++ b/test/Makefile @@ -6,13 +6,22 @@ #LIBINC=-L #LIBS= -OSTYPE=$(shell uname -s) +OS=$(shell uname -s) CC=gcc -CFLAGS=-Wall --static + +CFLAGS=-Wall --static -O2 -ggdb #-O2 -ggdb INCLUDES=-I ../src/ -LIBINC=-L ../src -LIBS=-lnazgul $(OSTYPE:Linux=-lrt) +LIBINC=-L ../src -L /usr/lib + +LIBS=-lnazgul +ifeq "SunOS" "${OS}" + LIBS=-lnazgul -lrt +endif + +ifeq "Linux" "${OS}" + LIBS=-lnazgul -lrt +endif PRJNAME=Libnazgul GDATE := $(shell date +"-%Y-%m-%d_r%H")