Commits

Shlomi Fish committed 10b8f42

Many fixes and new options to Makefile.gnu. This was done to test -Os.

git-svn-id: file:///home/shlomif/Backup/svn-dumps/google-code/svnsync-repos/fc-solve/trunk@1686 e7e8a897-7ba4-4ee7-b36f-f4c66519b19a

Comments (0)

Files changed (1)

fc-solve/source/Makefile.gnu

 
 DEBUG = 1
 PROFILE = 0
-WITH_TRACES = 1
+WITH_TRACES = 0
 FREECELL_ONLY = 0
-WITH_LIBRB = 1
+WITH_LIBRB = 0
 
 ifneq ($(DEBUG),0)
 	CFLAGS := -Wall -g
 else
 	CFLAGS := -Wall -O3
+	# CFLAGS := -Wall -Os
 endif
 
 ifneq ($(WITH_TRACES),0)
 
 DLFLAGS = $(LFLAGS)
 
-TARGETS = fc-solve mptest
+TARGETS = fc-solve libfreecell-solver.so \
+		  freecell-solver-multi-thread-solve \
+		  freecell-solver-range-parallel-solve
 
 ifeq ($(EXIT),1)
 
 	ar r $@ $(OBJECTS)
 	ranlib $@
 
+libfreecell-solver.so: $(OBJECTS)
+	gcc -shared -o $@ $(OBJECTS)
+
 fc-solve: main.o libfcs.a
 	$(CC) $(LFLAGS) -o $@ -L. $< -lfcs $(END_LFLAGS)
 
-mptest: test_multi_parallel.o libfcs.a
-	gcc -Wall -o $@ -L. $< -lfcs $(END_LFLAGS)
+freecell-solver-range-parallel-solve: test_multi_parallel.o libfreecell-solver.so
+	gcc -Wall -o $@ -Wl,-rpath,. -L. $< -lfreecell-solver $(END_LFLAGS)
+
+freecell-solver-multi-thread-solve: threaded_range_solver.o libfreecell-solver.so
+	gcc -Wall -o $@ -Wl,-rpath,. -L. $< -lfreecell-solver -lpthread $(END_LFLAGS)
 
 clean:
-	rm -f *.o $(TARGETS) libfcs.a test-lib mtest mptest
+	rm -f *.o $(TARGETS) libfcs.a test-lib mtest
 
 endif