Skip to content

Instantly share code, notes, and snippets.

@wyanez
Created April 25, 2019 03:42
Show Gist options
  • Save wyanez/aaf4c0d052d085b7725e4e331f43ff1b to your computer and use it in GitHub Desktop.
Save wyanez/aaf4c0d052d085b7725e4e331f43ff1b to your computer and use it in GitHub Desktop.
C Makefile Example
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