Lay foundation for unit test build framework.

GNU Make double colon rules, rule ;-)

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2015-08-22 21:59:52 +02:00
1 parent b7a8042c87
commit 2ea2357b62
3 files changed
+41 -44

No files matched your search

+3 -21
View File
@@ -1,22 +1,4 @@
# Unittest makefile for rsync.c
.PHONY: clean
SRC = rsync.c
OBJS = dir.o copyfile.o fexist.o fisdir.o fmode.o
UNIT = rsync.unittest
#CPPFLAGS = -DDEBUG -I../../.. -I../../include
all: build run
clean:
@rm -f $(OBJS) $(UNIT)
# This rule also forces a cleanup of built objects to not leave any object files
# lingering in the tree to interfere with cross builds.
build: clean $(OBJS)
$(CC) $(CFLAGS) $(CPPFLAGS) -o $(UNIT) -DUNITTEST $(SRC) $(OBJS)
@rm -f $(OBJS)
run:
@./$(UNIT)
OBJS = dir.o copyfile.o fexist.o fisdir.o fmode.o
TARGET = $(OBJS) rsync.test clean
include rules.mk