This commit is contained in:
Timo Schmidt 2023-03-19 02:20:06 +01:00
parent b254e06f44
commit 49478cb64d
1 changed files with 33 additions and 0 deletions

33
Makefile Normal file
View File

@ -0,0 +1,33 @@
# Makefile for rush00
include config.mk
SRC=main.c ${app}.c ft_putchar.c ft_lib.c arghandle.c
HEADERS=arghandle.h ft_lib.h ft_putchar.h rush0X.h
_OBJ=${SRC:.c=.o}
OBJ=${patsubst %,${OBJDIR}/%,${_OBJ}}
DEPS=${patsubst %,${INCDIR}/%,${HEADERS}}
rush: ${app}
${OBJDIR}/%.o: %.c ${DEPS}
${CC} -c -o $@ $< ${CFLAGS}
${app}: ${OBJ}
${CC} -o $@ $^ ${CFLAGS}
clean:
@unset -f rm
\rm -f ${OBJ} *~ ${INCDIR}/*~
install: rush
mkdir -p ${DESTDIR}${PREFIX}/bin
cp -f ${app} ${DESTDIR}${PREFIX}/bin
chmod 755 ${DESTDIR}${PREFIX}/bin/${app}
uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/${app}
.PHONY: clean