libhl/Makefile

36 lines
590 B
Makefile
Raw Normal View History

2023-08-21 09:05:27 -04:00
include config.mk
2023-08-21 09:30:48 -04:00
include chad.mk
2023-08-21 09:05:27 -04:00
SRC.dir:=source
2023-08-21 09:30:48 -04:00
OBJ.dir:=object
2023-08-16 01:06:37 -04:00
SRC:=$(shell find ${SRC.dir} -iname '*.c')
HDR:=$(shell find ${SRC.dir} -iname '*.h')
2023-08-21 09:25:14 -04:00
OBJ:=$(subst $(SRC.dir),$(OBJ.dir),$(SRC:.c=.o))
2023-08-21 09:05:27 -04:00
VPATH=${SRC.dir} ${OBJ.dir}
2023-08-21 09:05:27 -04:00
${OBJ.dir}/%.o: ${SRC.dir}/%.c
2023-08-16 01:06:37 -04:00
${COMPILE.c} $< -o $@
2023-08-23 22:45:13 -04:00
${TARGET}: ${HDR} | ${OBJ}
2023-08-21 09:25:14 -04:00
${LINK.c} $| -o $@
2023-08-21 09:05:27 -04:00
${SRC} ${HDR}:
install: ${PREFIX}
install -v -g ${USER} -o ${USER} -m 744 ${TARGET} ${PREFIX}/bin/
uninstall:
-rm ${PREFIX}/bin/${TARGET}
clean:
2023-08-21 09:05:27 -04:00
-rm ${OBJ} ${TARGET}
2023-08-24 13:16:40 -04:00
-rm *.out
2023-08-16 11:30:29 -04:00
test: chad_test
2023-08-21 09:05:27 -04:00
.PHONY: test clean install
.DEFAULT_GOAL:=${TARGET}