Skip to content

Commit eecf3e9

Browse files
committed
unix: Group CFLAGS related stuff together.
1 parent 2099b68 commit eecf3e9

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

unix/Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ INC += -I$(BUILD)
1818
CWARN = -Wall -Werror
1919
CFLAGS = $(INC) $(CWARN) -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT)
2020

21+
# Debugging/Optimization
22+
ifdef DEBUG
23+
CFLAGS += -g
24+
COPT = -O0
25+
else
26+
COPT = -Os #-DNDEBUG
27+
endif
28+
2129
UNAME_S := $(shell uname -s)
2230
ifeq ($(UNAME_S),Darwin)
2331
LDFLAGS = $(LDFLAGS_MOD) -lm -Wl,-map,$@.map,-order_file,$(BUILD)/order.def
@@ -57,14 +65,6 @@ SRC_MOD += modffi.c
5765
endif
5866

5967

60-
# Debugging/Optimization
61-
ifdef DEBUG
62-
CFLAGS += -g
63-
COPT = -O0
64-
else
65-
COPT = -Os #-DNDEBUG
66-
endif
67-
6868
# source files
6969
SRC_C = \
7070
main.c \

0 commit comments

Comments
 (0)