view q/makefile @ 26:336f06fa6e47

Add comment
author Daniel O'Connor <darius@dons.net.au>
date Tue, 25 Feb 2025 17:03:51 +1030
parents 388074ff9474
children
line wrap: on
line source

QVERSION=0x000902
CFLAGS=-std=c99 -Wall -Wextra -O2 -pedantic -fwrapv -DQVERSION=${QVERSION} -Wmissing-prototypes
CC=cc
TARGET=q
RM=rm -fv
AR=ar
RANLIB=ranlib

.PHONY: all run clean

all: ${TARGET} expr

run: test ${TARGET} t.q
	./${TARGET} t.q

test: ${TARGET}
	./${TARGET} -t


q.o: q.c q.h

lib${TARGET}.a: q.o
	${AR} rcs $@ $<
	${RANLIB} $@

check: *.c *.h
	cppcheck --enable=all *.c *.h

${TARGET}: lib${TARGET}.a t.o

expr: lib${TARGET}.a expr.o

clean:
	git clean -dffx