# See LICENSE file for copyright and license details.
# Build system is based on build system of dwm.
include config.mk
SRC = dpoke.c
OBJ = ${SRC:.c=.o}
all: options dpoke status
options:
@echo dpoke build options:
@echo "CFLAGS = ${DPOKE_CFLAGS}"
@echo "LDFLAGS = ${DPOKE_LDFLAGS}"
@echo "CC = ${CC}"
.c.o:
@echo CC $<
@${CC} -c ${DPOKE_CFLAGS} $<
${OBJ}: config.h config.mk
config.h:
@echo creating $@ from config.def.h
@cp config.def.h $@
dpoke: ${OBJ}
@echo CC -o $@
@${CC} -o $@ ${OBJ} ${DPOKE_LDFLAGS}
clean:
@echo cleaning
@rm -f dpoke ${OBJ} dpoke-${VERSION}.tar.gz
@for dir in $(STATUS); do make -C $$dir clean; done
dist: clean
@echo creating dist tarball
@mkdir -p dpoke-${VERSION}
@cp -R LICENSE Makefile* README config.def.h config.mk \
${SRC} status-* dpoke-${VERSION}
@tar -cf dpoke-${VERSION}.tar dpoke-${VERSION}
@gzip dpoke-${VERSION}.tar
@rm -rf dpoke-${VERSION}
status:
for dir in $(STATUS); do make -C $$dir; done
.PHONY: all options clean dist