Add debug as separate variable and separate sources
This commit is contained in:
parent
4ff817029b
commit
dd649c2ffc
23
Makefile
23
Makefile
@ -1,18 +1,15 @@
|
|||||||
include config.mk
|
include config.mk
|
||||||
|
include sources.mk
|
||||||
|
|
||||||
ifeq (${CC},clang)
|
ifeq (${CC},clang)
|
||||||
|
CFLAGS =\
|
||||||
CFLAGS :=\
|
|
||||||
-std=c99\
|
-std=c99\
|
||||||
-Weverything\
|
-Weverything\
|
||||||
-Wno-padded\
|
-Wno-padded\
|
||||||
-Wno-disabled-macro-expansion\
|
-Wno-disabled-macro-expansion\
|
||||||
-pedantic\
|
-pedantic
|
||||||
${CFLAGS}
|
|
||||||
|
|
||||||
else ifeq (${CC},gcc)
|
else ifeq (${CC},gcc)
|
||||||
|
CFLAGS =\
|
||||||
CFLAGS :=\
|
|
||||||
-std=c99\
|
-std=c99\
|
||||||
-Wall\
|
-Wall\
|
||||||
-Wextra\
|
-Wextra\
|
||||||
@ -29,13 +26,15 @@ CFLAGS :=\
|
|||||||
-Wshadow\
|
-Wshadow\
|
||||||
-Wunsafe-loop-optimizations\
|
-Wunsafe-loop-optimizations\
|
||||||
-Wparentheses\
|
-Wparentheses\
|
||||||
-pedantic\
|
-pedantic
|
||||||
${CFLAGS}
|
endif
|
||||||
|
|
||||||
|
ifeq (${DEBUG},1)
|
||||||
|
CFLAGS += -g
|
||||||
|
else
|
||||||
|
CFLAGS += -O2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SRC = dynarray.c
|
|
||||||
HDR = dynarray.h
|
|
||||||
OBJ = ${SRC:.c=.o}
|
OBJ = ${SRC:.c=.o}
|
||||||
|
|
||||||
all: ${OBJ}
|
all: ${OBJ}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
VERSION = 1.1.1
|
VERSION = 1.1.2
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
CC = clang
|
CC = clang
|
||||||
|
DEBUG = 1
|
||||||
|
2
sources.mk
Normal file
2
sources.mk
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
SRC = dynarray.c
|
||||||
|
HDR = dynarray.h
|
Reference in New Issue
Block a user