fuse/Makefile

38 lines
1.1 KiB
Makefile

UNITYPATH = test/unity
INC := -I include
WARNINGS := -m64 -pedantic -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
UNITY := -I $(UNITYPATH)
all: compile link
compile:
gcc $(INC) -c -o build/main.o src/main.c
gcc $(INC) -c -o build/fuse.o src/fuse.c
gcc $(INC) -c -o build/fsactions.o src/fsactions.c
gcc $(INC) -c -o build/fsinterface.o src/fsinterface.c
link:
gcc -o bin/fuse.out build/fsinterface.o build/fsactions.o build/fuse.o build/main.o
test: testCompile testLink testExec
testCompile:
gcc $(INC) $(UNITY) -g -c -o build/unity.o $(UNITYPATH)/unity.c
gcc $(INC) $(WARNINGS) -c -o build/main.o src/main.c
gcc $(INC) $(WARNINGS) -c -o build/fuse.o src/fuse.c
gcc $(INC) $(WARNINGS) -c -o build/fsactions.o src/fsactions.c
gcc $(INC) $(WARNINGS) -c -o build/fsinterface.o src/fsinterface.c
gcc $(INC) -g -c -o build/test.o test/test.c
testLink:
gcc -g -o bin/test.out build/fsinterface.o build/fsactions.o build/fuse.o build/test.o build/unity.o
gcc -g -o bin/fuse.out build/fsinterface.o build/fsactions.o build/fuse.o build/main.o
testExec:
./bin/test.out
clean:
rm build/*.o
rm bin/*.out
rm test/fakefs.test