diff --git a/getpid/Makefile b/getpid/Makefile index 7f9b2d9..4a9367e 100644 --- a/getpid/Makefile +++ b/getpid/Makefile @@ -1,6 +1,7 @@ NAME = getpid SRCDIR = ../rdtscbench CFLAGS = -lrt -lm +LDFLAGS=-lm OBJ = $(SRCDIR)/rdtscbench.o $(NAME).o @@ -9,7 +10,7 @@ all: $(MAKE) -C . $(NAME) $(NAME): $(OBJ) - $(CC) $(CFLAGS) -o $(NAME) $(OBJ) + $(CC) $(CFLAGS) -o $(NAME) $(OBJ) $(LDFLAGS) $(SRCDIR)/rdtscbench.o: $(SRCDIR)/rdtscbench.h $(SRCDIR)/rdtscbench.c diff --git a/matrix/Makefile b/matrix/Makefile index e05fd71..0a72c35 100644 --- a/matrix/Makefile +++ b/matrix/Makefile @@ -1,6 +1,7 @@ NAME = matrix SRCDIR = ../rdtscbench CFLAGS = -lrt -lm +LDFLAGS = -lm OBJ = $(SRCDIR)/rdtscbench.o $(NAME).o @@ -9,7 +10,7 @@ all: $(MAKE) -C . $(NAME) $(NAME): $(OBJ) - $(CC) $(CFLAGS) -o $(NAME) $(OBJ) + $(CC) $(CFLAGS) -o $(NAME) $(OBJ) $(LDFLAGS) $(SRCDIR)/rdtscbench.o: $(SRCDIR)/rdtscbench.h $(SRCDIR)/rdtscbench.c diff --git a/moreExamples/Makefile b/moreExamples/Makefile index 4b431bc..16682f9 100644 --- a/moreExamples/Makefile +++ b/moreExamples/Makefile @@ -1,6 +1,7 @@ NAME = moreExamples SRCDIR = ../rdtscbench CFLAGS = -lrt -lm +LDFLAGS = -lm OBJ = $(SRCDIR)/rdtscbench.o $(NAME).o @@ -9,7 +10,7 @@ all: $(MAKE) -C . $(NAME) $(NAME): $(OBJ) - $(CC) $(CFLAGS) -o $(NAME) $(OBJ) + $(CC) $(CFLAGS) -o $(NAME) $(OBJ) $(LDFLAGS) $(SRCDIR)/rdtscbench.o: $(SRCDIR)/rdtscbench.h $(SRCDIR)/rdtscbench.c diff --git a/rdtscbench/Makefile b/rdtscbench/Makefile index 4262536..eb3af63 100644 --- a/rdtscbench/Makefile +++ b/rdtscbench/Makefile @@ -1,11 +1,12 @@ -CFLAGS = -lrt -lm +CFLAGS = -lrt -lm +LDFLAGS = -lm all: gethz rdtscbench.o gethz: ./gethz.sh -rdtscbench.o: rdtscbench.h rdtscbench.c +rdtscbench.o: rdtscbench.h rdtscbench.c $(LDFLAGS) clean: rm -f *~