Add builddir

This commit is contained in:
Timo Schmidt 2023-03-19 02:22:30 +01:00
parent 2f9090672a
commit 62c430b8d0
2 changed files with 3 additions and 2 deletions

View File

@ -16,7 +16,7 @@ ${OBJDIR}/%.o: %.c ${DEPS}
${CC} -c -o $@ $< ${CFLAGS}
${app}: ${OBJ}
${CC} -o $@ $^ ${CFLAGS}
${CC} -o ${BUILDDIR}/$@ $^ ${CFLAGS}
clean:
@unset -f rm
@ -24,7 +24,7 @@ clean:
install: rush
mkdir -p ${DESTDIR}${PREFIX}/bin
cp -f ${app} ${DESTDIR}${PREFIX}/bin
cp -f ${BUILDDIR}/${app} ${DESTDIR}${PREFIX}/bin
chmod 755 ${DESTDIR}${PREFIX}/bin/${app}
uninstall:

View File

@ -4,6 +4,7 @@
PREFIX = ~/.local
INCDIR = include
OBJDIR = obj
BUILDDIR = build
# includes
INCS = -I${INCDIR}