Fixed not isolating objects in obj
This commit is contained in:
parent
b21b46e825
commit
ce284f667b
6
Makefile
6
Makefile
@ -6,15 +6,15 @@ OBJ.dir:=obj
|
|||||||
|
|
||||||
SRC:=$(shell find ${SRC.dir} -iname '*.c')
|
SRC:=$(shell find ${SRC.dir} -iname '*.c')
|
||||||
HDR:=$(shell find ${SRC.dir} -iname '*.h')
|
HDR:=$(shell find ${SRC.dir} -iname '*.h')
|
||||||
OBJ:=$(SRC:.c=.o)
|
OBJ:=$(subst $(SRC.dir),$(OBJ.dir),$(SRC:.c=.o))
|
||||||
|
|
||||||
VPATH=${SRC.dir} ${OBJ.dir}
|
VPATH=${SRC.dir} ${OBJ.dir}
|
||||||
|
|
||||||
${OBJ.dir}/%.o: ${SRC.dir}/%.c
|
${OBJ.dir}/%.o: ${SRC.dir}/%.c
|
||||||
${COMPILE.c} $< -o $@
|
${COMPILE.c} $< -o $@
|
||||||
|
|
||||||
${TARGET}: ${OBJ} | ${HDR}
|
${TARGET}: ${HDR} ${OBJ.dir} | ${OBJ}
|
||||||
${LINK.c} $+ -o $@
|
${LINK.c} $| -o $@
|
||||||
|
|
||||||
${SRC} ${HDR}:
|
${SRC} ${HDR}:
|
||||||
|
|
||||||
|
19
config.mk
19
config.mk
@ -15,22 +15,3 @@ ifeq (${DEBUG},1)
|
|||||||
else
|
else
|
||||||
CFLAGS += -O2 -flto=auto
|
CFLAGS += -O2 -flto=auto
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Programs to check warnings for as defined by the chad standard
|
|
||||||
|
|
||||||
GCC:=gcc
|
|
||||||
GCC.warnings:=-Wall -Wextra -Wpedantic -Wvla -Wshadow -Wundef
|
|
||||||
|
|
||||||
CLANG:=clang
|
|
||||||
CLANG.warnings:=-Weverything
|
|
||||||
|
|
||||||
VALGRIND:=valgrind
|
|
||||||
VALGRIND.flags:=--track-origins=yes --leak-check=full --show-leak-kinds=all
|
|
||||||
|
|
||||||
TARGET:=hl
|
|
||||||
ARGS:=${TARGET} < source/main.c
|
|
||||||
|
|
||||||
chad_test:
|
|
||||||
${GCC} ${GCC.warnings} ${SRC} -o ${TARGET}
|
|
||||||
${CLANG} ${GCC.warnings} ${SRC} -o ${TARGET}
|
|
||||||
${VALGRIND} ${VALGRIND.flags} ${TARGET} ${ARGS}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user