Created
April 25, 2019 03:42
-
-
Save wyanez/aaf4c0d052d085b7725e4e331f43ff1b to your computer and use it in GitHub Desktop.
C Makefile Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CFLAGS=-Wall -Werror -lssl -lcrypto | |
default: testcase1 testcase2 testcase3 testcase4 base | |
base: base.c filesys.c | |
gcc -o base base.c filesys.c $(CFLAGS) | |
testcase1: filesys.c testcase1.c base | |
gcc -o testcase1 testcase1.c filesys.c $(CFLAGS) | |
testcase2: filesys.c testcase2.c base | |
gcc -o testcase2 testcase2.c filesys.c $(CFLAGS) | |
run: | |
./base | |
./testcase1 | |
./base | |
./testcase2 | |
clean: | |
rm -rf testcase1 testcase2 base *.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment