From: Brian Norris Date: Mon, 21 May 2012 04:26:07 +0000 (-0700) Subject: Makfile: fix linking error + remove EOL whitespace X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=commitdiff_plain;h=3d3eb15b67956341e22288081ef887a281ed49e1 Makfile: fix linking error + remove EOL whitespace If you're using libdl for dynamic loading, you need to include the library flag at the top-level linking. --- diff --git a/Makefile b/Makefile index fcd7b5c3..54dcad14 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ MEMCPPFLAGS=-fPIC -g -c -Wall all: $(BIN) $(BIN): $(USER_O) $(LIB_SO) $(LIB_MEM_SO) - $(CXX) -o $(BIN) $(USER_O) -L. -l$(LIB_NAME) -l$(LIB_MEM) $(CPPFLAGS) + $(CXX) -o $(BIN) $(USER_O) -L. -l$(LIB_NAME) -l$(LIB_MEM) $(CPPFLAGS) $(LDFLAGS) # note: implicit rule for generating $(USER_O) (i.e., userprog.c -> userprog.o) @@ -39,7 +39,7 @@ malloc.o: malloc.c $(CC) $(MEMCPPFLAGS) -DMSPACES -DONLY_MSPACES malloc.c mymemory.o: mymemory.h snapshotimp.h mymemory.cc - $(CXX) $(MEMCPPFLAGS) mymemory.cc + $(CXX) $(MEMCPPFLAGS) mymemory.cc snapshot.o: mymemory.h snapshot.h snapshotimp.h snapshot.cc $(CXX) $(MEMCPPFLAGS) snapshot.cc