chip8

CHIP-8 emulator
git clone git://git.christosmarg.xyz/chip8.git
Log | Files | Refs | README | LICENSE

commit 209591c7b0a2fc110e28dd24e01655d16b1cc757
parent 3d1643c9f31a84a19fedfc32e22a66098562eb57
Author: Christos Margiolis <christos@margiolis.net>
Date:   Wed, 21 Oct 2020 04:11:41 +0300

added POSIX Makefile

Diffstat:
MMakefile | 54+++++++++++++++++++++++++++++-------------------------
1 file changed, 29 insertions(+), 25 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,4 +1,6 @@ # See LICENSE file for copyright and license details. +# chip8 - a minimal chip8 emulator +.POSIX: BIN = chip8 VERSION = 0.1 @@ -8,9 +10,11 @@ PREFIX = /usr/local MAN_DIR = ${PREFIX}/man/man1 BIN_DIR = ${PREFIX}/bin -EXT = c -SRC = ${wildcard *.${EXT}} -OBJ = ${SRC:%.${EXT}=%.o} +#EXT = c +#SRC = ${wildcard *.${EXT}} +#OBJ = ${SRC:%.${EXT}=%.o} +SRC = chip8.c +OBJ = chip8.o CC = gcc INCS = -Iinclude @@ -28,41 +32,41 @@ GZIP = gzip all: options ${BIN} options: - @echo ${BIN} build options: - @echo "CFLAGS = ${CFLAGS}" - @echo "LDFLAGS = ${LDFLAGS}" - @echo "CC = ${CC}" + @echo ${BIN} build options: + @echo "CFLAGS = ${CFLAGS}" + @echo "LDFLAGS = ${LDFLAGS}" + @echo "CC = ${CC}" ${BIN}: ${OBJ} - ${CC} ${LDFLAGS} $^ -o $@ + ${CC} ${LDFLAGS} ${OBJ} -o $@ ${OBJ}: ${SRC} - ${CC} ${CFLAGS} -c $< -o $@ + ${CC} ${CFLAGS} -c ${SRC} -o $@ dist: clean - ${MKDIR} ${DIST} - ${CP} -R roms ${SRC} LICENSE Makefile README.md ${DIST} - ${TAR} ${DIST}.tar ${DIST} - ${GZIP} ${DIST}.tar - ${RM_DIR} ${DIST} + ${MKDIR} ${DIST} + ${CP} -R roms ${SRC} LICENSE Makefile README.md ${DIST} + ${TAR} ${DIST}.tar ${DIST} + ${GZIP} ${DIST}.tar + ${RM_DIR} ${DIST} run: - ./${BIN} + ./${BIN} install: all - #${MKDIR} ${DESTDIR}${BIN_DIR} ${DESTDIR}${MAN_DIR} - ${MKDIR} ${DESTDIR}${BIN_DIR} - ${CP} ${BIN} ${BIN_DIR} - #${CP} ${MAN1} ${DESTDIR}${MAN_DIR} - #sed "s/VERSION/${VERSION}/g" < ${MAN1} > ${DESTDIR}${MAN_DIR}/${MAN1} - chmod 755 ${DESTDIR}${BIN_DIR}/${BIN} - #chmod 644 ${DESTDIR}${MAN_DIR}/${MAN1} + #${MKDIR} ${DESTDIR}${BIN_DIR} ${DESTDIR}${MAN_DIR} + ${MKDIR} ${DESTDIR}${BIN_DIR} + ${CP} ${BIN} ${BIN_DIR} + #${CP} ${MAN1} ${DESTDIR}${MAN_DIR} + #sed "s/VERSION/${VERSION}/g" < ${MAN1} > ${DESTDIR}${MAN_DIR}/${MAN1} + chmod 755 ${DESTDIR}${BIN_DIR}/${BIN} + #chmod 644 ${DESTDIR}${MAN_DIR}/${MAN1} uninstall: - ${RM} ${DESTDIR}${BIN_DIR}/${BIN} - #${RM} ${DESTDIR}${MAN_DIR}/${MAN1} + ${RM} ${DESTDIR}${BIN_DIR}/${BIN} + #${RM} ${DESTDIR}${MAN_DIR}/${MAN1} clean: - ${RM} ${BIN} ${OBJ} ${DIST}.tar.gz + ${RM} ${BIN} ${OBJ} ${DIST}.tar.gz .PHONY: all options clean dist install uninstall run