stuffy/Makefile
2022-11-02 15:29:00 -05:00

32 lines
619 B
Makefile

UNITY = test/unity/
INC := -I include -I $(UNITY)
all: compile link
compile:
gcc $(INC) -c -o build/main.o src/main.c
gcc $(INC) -c -o build/stuffy.o src/stuffy.c
link:
gcc -o bin/stuffy.out build/*.o
exec: compile link
./bin/stuffy.out -a test/example.tar test/sample.txt
test: testCompile testLink testExec
testCompile:
gcc $(INC) -g -c -o build/unity.o $(UNITY)/unity.c
gcc $(INC) -g -c -o build/stuffy.o src/stuffy.c
gcc $(INC) -g -c -o build/test.o test/test.c
testLink:
gcc -g -o bin/test.out build/stuffy.o build/test.o build/unity.o
testExec:
./bin/test.out
clean:
rm build/*.o
rm bin/*.out