From 664e29a7fe054d2784e5360a60ba72d61944aa53 Mon Sep 17 00:00:00 2001 From: LiviaMedeiros Date: Fri, 6 Sep 2024 21:57:12 +0800 Subject: [PATCH] Make optimization level configurable via `CFLAGS` env variable --- ip2net/Makefile | 3 ++- mdig/Makefile | 3 ++- nfq/Makefile | 3 ++- tpws/Makefile | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ip2net/Makefile b/ip2net/Makefile index 97a53d7..2d2756e 100644 --- a/ip2net/Makefile +++ b/ip2net/Makefile @@ -1,5 +1,6 @@ CC ?= gcc -CFLAGS += -std=gnu99 -O3 +CFLAGS ?= -O3 +CFLAGS += -std=gnu99 CFLAGS_BSD = -Wno-address-of-packed-member CFLAGS_WIN = -static LIBS = diff --git a/mdig/Makefile b/mdig/Makefile index 58bc4b4..11c2e6d 100644 --- a/mdig/Makefile +++ b/mdig/Makefile @@ -1,5 +1,6 @@ CC ?= gcc -CFLAGS += -std=gnu99 -O3 +CFLAGS ?= -O3 +CFLAGS += -std=gnu99 CFLAGS_BSD = -Wno-address-of-packed-member CFLAGS_WIN = -static LIBS = -lpthread diff --git a/nfq/Makefile b/nfq/Makefile index 783f437..1ca8568 100644 --- a/nfq/Makefile +++ b/nfq/Makefile @@ -1,5 +1,6 @@ CC ?= gcc -CFLAGS += -std=gnu99 -O3 +CFLAGS ?= -O3 +CFLAGS += -std=gnu99 CFLAGS_BSD = -Wno-address-of-packed-member CFLAGS_MAC = -mmacosx-version-min=10.8 CFLAGS_CYGWIN = -Wno-address-of-packed-member -static diff --git a/tpws/Makefile b/tpws/Makefile index 52b72f7..af2a2ec 100644 --- a/tpws/Makefile +++ b/tpws/Makefile @@ -1,5 +1,6 @@ CC ?= gcc -CFLAGS += -std=gnu99 -O3 +CFLAGS ?= -O3 +CFLAGS += -std=gnu99 CFLAGS_BSD = -Wno-address-of-packed-member LIBS = -lz -lpthread SRC_FILES = *.c