2024-02-06 19:28:28 +01:00
|
|
|
CC=gcc
|
|
|
|
|
2024-02-11 02:07:02 +01:00
|
|
|
VERSION = 1.0
|
2024-02-06 19:28:28 +01:00
|
|
|
PREFIX = /usr/local
|
|
|
|
MANPREFIX = ${PREFIX}/share/man
|
|
|
|
|
2024-02-06 19:56:42 +01:00
|
|
|
CFLAGS = -std=gnu11 -O0 -Wall -DVERSION=\"${VERSION}\"
|
2024-02-06 19:28:28 +01:00
|
|
|
|
2024-02-11 02:01:28 +01:00
|
|
|
SRC = rush.c color.c constants.h history.c commands.c job.c
|
2024-02-06 19:28:28 +01:00
|
|
|
OBJ = ${SRC:.c=.o}
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
${CC} -c ${CFLAGS} $<
|
|
|
|
|
|
|
|
rush: ${OBJ}
|
|
|
|
${CC} -o $@ ${OBJ}
|
2024-02-11 02:07:02 +01:00
|
|
|
strip rush
|
2024-02-06 19:28:28 +01:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf rush
|
|
|
|
|
|
|
|
dist:
|
|
|
|
mkdir -p rush-${VERSION}
|
|
|
|
cp -R LICENSE Makefile README.md rush.1 rush rush-${VERSION}
|
|
|
|
tar -cf rush-${VERSION}.tar rush-${VERSION}
|
|
|
|
gzip rush-${VERSION}.tar
|
|
|
|
rm -rf rush-${VERSION}
|
|
|
|
|
|
|
|
install: all
|
|
|
|
mkdir -p ${DESTDIR}${PREFIX}/bin
|
|
|
|
cp -f rush ${DESTDIR}${PREFIX}/bin
|
|
|
|
chmod 755 ${DESTDIR}${PREFIX}/bin/rush
|
|
|
|
mkdir -p ${DESTDIR}${MANPREFIX}/man1
|
2024-02-06 19:56:42 +01:00
|
|
|
cp -f rush.1 ${DESTDIR}${MANPREFIX}/man1
|
2024-02-06 19:28:28 +01:00
|
|
|
chmod 644 ${DESTDIR}${MANPREFIX}/man1/rush.1
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
rm -f ${DESTDIR}${PREFIX}/bin/rush\
|
|
|
|
${DESTDIR}${MANPREFIX}/man1/rush.1
|
|
|
|
all: rush
|
|
|
|
|
|
|
|
.PHONY: all clean dist install uninstall rush
|