Skip to content

Commit

Permalink
updated makefiles to handle pthreads issue
Browse files Browse the repository at this point in the history
  • Loading branch information
joe committed Sep 24, 2014
1 parent 45f21a1 commit c15cf54
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions mmap_locks/Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#CC=/usr/pkg/bin/g++
CC=/usr/bin/g++
CFLAGS= -g -Wall -I.
LINKFLAGS= -g -Wall
LINKFLAGS= -g -Wall

all: producer consumer

producer: producer.o message.o
$(CC) $(LINKFLAGS) -o producer producer.o message.o -lpthread
$(CC) $(LINKFLAGS) -o producer producer.o message.o -lpthread -pthread

consumer: consumer.o message.o
$(CC) $(LINKFLAGS) -o consumer consumer.o message.o -lpthread
$(CC) $(LINKFLAGS) -o consumer consumer.o message.o -lpthread -pthread

message.o: message.cc message.hh
$(CC) $(CFLAGS) -c message.cc -o message.o
Expand Down
2 changes: 1 addition & 1 deletion monitor/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#CC=/usr/pkg/bin/g++
CC=/usr/bin/g++
CFLAGS= -g -Wall -I.
LINKFLAGS= -g -Wall -lpthread
LINKFLAGS= -g -Wall -lpthread -pthread

all: demo

Expand Down
2 changes: 1 addition & 1 deletion mutex/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#CC=/usr/pkg/bin/g++
CC=/usr/bin/g++
CFLAGS= -g -Wall -I.
LINKFLAGS= -g -Wall -lpthread
LINKFLAGS= -g -Wall -lpthread -pthread

all: demo

Expand Down
2 changes: 1 addition & 1 deletion semaphore/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#CC=/usr/pkg/bin/g++
CC=/usr/bin/g++
CFLAGS= -g -Wall -I.
LINKFLAGS= -g -Wall -lpthread
LINKFLAGS= -g -Wall -lpthread -pthread

all: demo

Expand Down
2 changes: 1 addition & 1 deletion spin_lock/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#CC=/usr/pkg/bin/g++
CC=/usr/bin/g++
CFLAGS= -g -Wall -I.
LINKFLAGS= -g -Wall -lpthread
LINKFLAGS= -g -Wall -lpthread -pthread

all: demo

Expand Down
2 changes: 1 addition & 1 deletion stm/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#CC=/usr/pkg/bin/g++
CC=/usr/bin/g++
CFLAGS= -g -Wall -I.
LINKFLAGS= -g -Wall -lpthread
LINKFLAGS= -g -Wall -lpthread -pthread

all: demo

Expand Down

0 comments on commit c15cf54

Please sign in to comment.