Created
March 13, 2016 01:43
-
-
Save fearofcode/ff7b06fbdf9de3b54b58 to your computer and use it in GitHub Desktop.
simple makefile showing syntax for using extra libraries and useful warning flags
This file contains hidden or 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
all: lc gmmc | |
CC=gcc | |
CFLAGS= -g -m64 -O3 -std=gnu11 -Wall -Werror -Wextra -Wshadow -pedantic \ | |
-Wextra -Wunknown-pragmas -Wfloat-equal -Wcast-qual | |
LDLIBS= -lgsl -lgslcblas -lm | |
lc: learning_c.c | |
$(CC) $(CFLAGS) -o $@ learning_c.c | |
gmmc: golden_monkey_monte_carlo.c | |
$(CC) $(CFLAGS) -o $@ golden_monkey_monte_carlo.c $(LDLIBS) | |
clean: | |
rm gmmc | |
rm lc | |
rm *.s | |
rm *.o |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment