From 3d3eb15b67956341e22288081ef887a281ed49e1 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Sun, 20 May 2012 21:26:07 -0700 Subject: [PATCH] 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. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fcd7b5c..54dcad1 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 -- 2.34.1