Add debug as separate variable and separate sources

This commit is contained in:
Alex D. 2021-08-17 18:43:57 +00:00
parent 5ed1818d96
commit 3e3495e0cb
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
3 changed files with 15 additions and 13 deletions

View File

@ -1,18 +1,15 @@
include config.mk
include sources.mk
ifeq (${CC},clang)
CFLAGS :=\
CFLAGS =\
-std=c99\
-Weverything\
-Wno-padded\
-Wno-disabled-macro-expansion\
-pedantic\
${CFLAGS}
-pedantic
else ifeq (${CC},gcc)
CFLAGS :=\
CFLAGS =\
-std=c99\
-Wall\
-Wextra\
@ -29,13 +26,15 @@ CFLAGS :=\
-Wshadow\
-Wunsafe-loop-optimizations\
-Wparentheses\
-pedantic\
${CFLAGS}
-pedantic
endif
ifeq (${DEBUG},1)
CFLAGS += -g
else
CFLAGS += -O2
endif
SRC = llist.c
HDR = llist.h
OBJ = ${SRC:.c=.o}
all: ${OBJ}

View File

@ -1,3 +1,4 @@
VERSION = 1.5.0
VERSION = 1.5.1
PREFIX = /usr/local
CC = clang
DEBUG = 1

2
sources.mk Normal file
View File

@ -0,0 +1,2 @@
SRC = llist.c
HDR = llist.h