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} ${CC} -c -o $@ $< ${CFLAGS}
${app}: ${OBJ} ${app}: ${OBJ}
${CC} -o $@ $^ ${CFLAGS} ${CC} -o ${BUILDDIR}/$@ $^ ${CFLAGS}
clean: clean:
@unset -f rm @unset -f rm
@ -24,7 +24,7 @@ clean:
install: rush install: rush
mkdir -p ${DESTDIR}${PREFIX}/bin mkdir -p ${DESTDIR}${PREFIX}/bin
cp -f ${app} ${DESTDIR}${PREFIX}/bin cp -f ${BUILDDIR}/${app} ${DESTDIR}${PREFIX}/bin
chmod 755 ${DESTDIR}${PREFIX}/bin/${app} chmod 755 ${DESTDIR}${PREFIX}/bin/${app}
uninstall: uninstall:

View File

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