Added -lm linker flag.

This commit is contained in:
Lewis Van Winkle
2016-01-24 21:38:06 -06:00
parent dc643905d1
commit 00996e2c25

View File

@@ -1,23 +1,24 @@
CC = gcc CC = gcc
CCFLAGS = -ansi -Wall -Wshadow -O2 $(EXTRAS) CCFLAGS = -ansi -Wall -Wshadow -O2
LFLAGS = -lm
all: test bench example example2 all: test bench example example2
test: test.o tinyexpr.o test: test.o tinyexpr.o
$(CC) $(CCFLAGS) -o $@ $^ $(CC) $(CCFLAGS) -o $@ $^ $(LFLAGS)
./$@ ./$@
bench: benchmark.o tinyexpr.o bench: benchmark.o tinyexpr.o
$(CC) $(CCFLAGS) -o $@ $^ $(CC) $(CCFLAGS) -o $@ $^ $(LFLAGS)
example: example.o tinyexpr.o example: example.o tinyexpr.o
$(CC) $(CCFLAGS) -o $@ $^ $(CC) $(CCFLAGS) -o $@ $^ $(LFLAGS)
example2: example2.o tinyexpr.o example2: example2.o tinyexpr.o
$(CC) $(CCFLAGS) -o $@ $^ $(CC) $(CCFLAGS) -o $@ $^ $(LFLAGS)
.c.o: .c.o:
$(CC) -c $(CCFLAGS) $< -o $@ $(CC) -c $(CCFLAGS) $< -o $@