diff --git a/Makefile b/Makefile index 85d148e..0c7ca8b 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/config.mk b/config.mk index a20be45..6ff729b 100644 --- a/config.mk +++ b/config.mk @@ -4,6 +4,7 @@ PREFIX = ~/.local INCDIR = include OBJDIR = obj +BUILDDIR = build # includes INCS = -I${INCDIR}