From: Brian Norris <banorris@uci.edu>
Date: Mon, 21 May 2012 17:05:47 +0000 (-0700)
Subject: Makefile: only build a single shared library
X-Git-Tag: pldi2013~415
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0cea5009ef09585eaa6e60ba5a4662a2ea60eec4;p=model-checker.git

Makefile: only build a single shared library

Now that everything is uniform, we can easily just build a single library.
---

diff --git a/Makefile b/Makefile
index 43be84d..f91f4fd 100644
--- a/Makefile
+++ b/Makefile
@@ -3,9 +3,7 @@ CXX=g++
 
 BIN=model
 LIB_NAME=model
-LIB_MEM=mymemory
 LIB_SO=lib$(LIB_NAME).so
-LIB_MEM_SO=lib$(LIB_MEM).so
 
 USER_O=userprog.o
 USER_H=libthreads.h libatomic.h
@@ -23,16 +21,13 @@ LDFLAGS=-ldl -lrt
 
 all: $(BIN)
 
-$(BIN): $(USER_O) $(LIB_SO) $(LIB_MEM_SO)
-	$(CXX) -o $(BIN) $(USER_O) -L. -l$(LIB_NAME) -l$(LIB_MEM)
+$(BIN): $(USER_O) $(LIB_SO)
+	$(CXX) -o $(BIN) $(USER_O) -L. -l$(LIB_NAME)
 
 # note: implicit rule for generating $(USER_O) (i.e., userprog.c -> userprog.o)
 
-$(LIB_SO): $(MODEL_O) $(MODEL_H)
-	$(CXX) -shared -o $(LIB_SO) $(MODEL_O) $(LDFLAGS)
-
-$(LIB_MEM_SO): $(SHMEM_O) $(SHMEM_H)
-	$(CXX) -shared -o $(LIB_MEM_SO) $(SHMEM_O) $(LDFLAGS)
+$(LIB_SO): $(MODEL_O) $(MODEL_H) $(SHMEM_O) $(SHMEM_H)
+	$(CXX) -shared -o $(LIB_SO) $(MODEL_O) $(SHMEM_O) $(LDFLAGS)
 
 malloc.o: malloc.c
 	$(CC) -fPIC -c malloc.c -DMSPACES -DONLY_MSPACES $(CPPFLAGS)