mirror of
https://github.com/wolfcw/libfaketime.git
synced 2026-05-17 00:26:16 +03:00
Test suite Makefile overhaul.
* Use variables for compiler and linker flags. * Use variables for source/object files and binaries. * Use proper targets instead of phony targets to build the timetest program. Signed-off-by: Lukas Fleischer <info@cryptocrack.de>
This commit is contained in:
@@ -1,18 +1,27 @@
|
||||
CC = gcc
|
||||
|
||||
all: testprog test
|
||||
CFLAGS = -DFAKE_STAT
|
||||
LDFLAGS = -lrt
|
||||
|
||||
testprog: timetest.c
|
||||
${CC} -DFAKE_STAT -o timetest timetest.c -lrt
|
||||
SRC = timetest.c
|
||||
OBJ = ${SRC:.c=.o}
|
||||
|
||||
test: testprog
|
||||
all: timetest test
|
||||
|
||||
.c.o:
|
||||
${CC} -c ${CFLAGS} $<
|
||||
|
||||
timetest: ${OBJ}
|
||||
${CC} -o $@ ${OBJ} ${LDFLAGS}
|
||||
|
||||
test: timetest
|
||||
@echo
|
||||
@./test.sh
|
||||
|
||||
clean:
|
||||
@rm -f timetest
|
||||
@rm -f ${OBJ} timetest
|
||||
|
||||
distclean: clean
|
||||
@echo
|
||||
|
||||
.PHONY: all testprog test clean distclean
|
||||
.PHONY: all test clean distclean
|
||||
|
||||
Reference in New Issue
Block a user