stuffy/Makefile

29 lines
563 B
Makefile
Raw Normal View History

2022-11-02 15:29:00 -05:00
UNITY = test/unity/
INC := -I include -I $(UNITY)
2022-10-31 15:38:39 -05:00
all: compile link
compile:
gcc $(INC) -c -o build/main.o src/main.c
2022-11-02 15:29:00 -05:00
gcc $(INC) -c -o build/stuffy.o src/stuffy.c
2022-10-31 15:38:39 -05:00
link:
2022-11-08 20:37:57 -06:00
gcc -o bin/stuffy.out build/stuffy.o build/main.o
2022-10-31 15:38:39 -05:00
2022-11-02 15:29:00 -05:00
test: testCompile testLink testExec
2022-10-31 15:38:39 -05:00
2022-11-02 15:29:00 -05:00
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
2022-10-31 15:38:39 -05:00
2022-11-02 15:29:00 -05:00
testLink:
gcc -g -o bin/test.out build/stuffy.o build/test.o build/unity.o
testExec:
./bin/test.out
2022-10-31 15:38:39 -05:00
clean:
rm build/*.o
rm bin/*.out