stuffy/Makefile

32 lines
685 B
Makefile
Raw Permalink Normal View History

UNITYPATH = test/unity
2022-11-10 18:30:35 -06:00
INC := -I include
UNITY := -I $(UNITYPATH)
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:
2022-11-10 18:30:35 -06:00
gcc $(INC) $(UNITY) -g -c -o build/unity.o $(UNITYPATH)/unity.c
2022-11-10 22:10:49 -06:00
gcc $(INC) -c -o build/main.o src/main.c
2022-11-02 15:29:00 -05:00
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
2022-11-10 22:10:49 -06:00
gcc -o bin/stuffy.out build/stuffy.o build/main.o
2022-11-02 15:29:00 -05:00
testExec:
./bin/test.out
2022-10-31 15:38:39 -05:00
clean:
rm build/*.o
rm bin/*.out