diff --git a/setup.sh b/setup.sh
index 4bc5d92b3fc6354a9460c577d5eb3e1eff298941..9d6e788dfb4ee872f6c42834c04c1c928d19032d 100755
--- a/setup.sh
+++ b/setup.sh
@@ -56,6 +56,9 @@ prepare_generic()
 	mkdir -p build/freetype2 >> $ROOT/setup.log
 	mkdir -p build/oglft >> $ROOT/setup.log
 	mkdir -p build/boinc >> $ROOT/setup.log
+	mkdir -p build/framework >> $ROOT/setup.log
+	mkdir -p build/orc >> $ROOT/setup.log
+	mkdir -p build/starsphere >> $ROOT/setup.log
 	
 	echo "Preparing install tree..." | tee -a $ROOT/setup.log
 	mkdir -p install/bin >> $ROOT/setup.log
@@ -180,7 +183,33 @@ build_mingw()
 
 build_starsphere()
 {
-	echo "Not yet implemented: build_starsphere()"
+	echo "Building Starsphere [ORC] (this may take a while)..." | tee -a $ROOT/setup.log
+	export ORC_SRC=$ROOT/src/orc
+	export ORC_INSTALL=$ROOT/install
+	cd $ROOT/build/orc
+	cp $ROOT/src/orc/Makefile .  >> $ROOT/setup.log
+	make >> $ROOT/setup.log
+	make install >> $ROOT/setup.log
+	echo "Successfully built and installed Starsphere [ORC]!" | tee -a $ROOT/setup.log
+
+	echo "Building Starsphere [Framework] (this may take a while)..." | tee -a $ROOT/setup.log
+	export FRAMEWORK_SRC=$ROOT/src/framework
+	export FRAMEWORK_INSTALL=$ROOT/install
+	cd $ROOT/build/framework
+	cp $ROOT/src/framework/Makefile .  >> $ROOT/setup.log
+	make >> $ROOT/setup.log
+	make install >> $ROOT/setup.log
+	echo "Successfully built and installed Starsphere [Framework]!" | tee -a $ROOT/setup.log
+
+	echo "Building Starsphere [Application] (this may take a while)..." | tee -a $ROOT/setup.log
+	export STARSPHERE_SRC=$ROOT/src/starsphere
+	export STARSPHERE_INSTALL=$ROOT/install
+	cd $ROOT/build/starsphere
+	cp $ROOT/src/starsphere/Makefile .  >> $ROOT/setup.log
+	cp $ROOT/src/starsphere/*.res .  >> $ROOT/setup.log
+	make >> $ROOT/setup.log
+	make install >> $ROOT/setup.log
+	echo "Successfully built and installed Starsphere [Application]!" | tee -a $ROOT/setup.log
 }
 
 build_linux()
diff --git a/src/framework/Makefile b/src/framework/Makefile
new file mode 100644
index 0000000000000000000000000000000000000000..02108c0548f41a57c1761cf21b57b3840284b590
--- /dev/null
+++ b/src/framework/Makefile
@@ -0,0 +1,79 @@
+###########################################################################
+#   Copyright (C) 2008 by Oliver Bock                                     #
+#   oliver.bock[AT]aei.mpg.de                                             #
+#                                                                         #
+#   This file is part of Einstein@Home.                                   #
+#                                                                         #
+#   Einstein@Home is free software: you can redistribute it and/or modify #
+#   it under the terms of the GNU General Public License as published     #
+#   by the Free Software Foundation, version 2 of the License.            #
+#                                                                         #
+#   Einstein@Home is distributed in the hope that it will be useful,      #
+#   but WITHOUT ANY WARRANTY; without even the implied warranty of        #
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the          #
+#   GNU General Public License for more details.                          #
+#                                                                         #
+#   You should have received a copy of the GNU General Public License     #
+#   along with Einstein@Home. If not, see <http://www.gnu.org/licenses/>. #
+#                                                                         #
+###########################################################################
+
+# path settings
+FRAMEWORK_SRC?=$(PWD)
+FRAMEWORK_INSTALL?=$(PWD)
+
+# config values
+CXX?=g++
+
+# variables
+CPPFLAGS = $(shell $(FRAMEWORK_INSTALL)/bin/sdl-config --cflags)
+CPPFLAGS += $(shell $(FRAMEWORK_INSTALL)/bin/freetype-config --cflags)
+CPPFLAGS += -I$(FRAMEWORK_INSTALL)/include/BOINC -I/usr/include
+
+DEPS = Makefile
+OBJS = AbstractGraphicsEngine.o GraphicsEngineFactory.o WindowManager.o Resource.o ResourceFactory.o BOINCClientAdapter.o
+DEBUGFLAGSCPP = -pg -ggdb -O0
+
+# TODO: GraphicsEngineFactory obviously depends on the actual implementations (here starsphere)! need to change the structure! what about plugins?
+CPPFLAGS += -I$(FRAMEWORK_SRC) -I$(FRAMEWORK_SRC)/../starsphere
+
+# primary role based tagets
+default: release
+debug: libframework.a
+memcheck: clean debug
+callgrind: clean debug
+release: clean libframework.a
+
+# target specific options
+debug: CPPFLAGS += $(DEBUGFLAGSCPP)
+release: CPPFLAGS += -DNDEBUG -O3 -Wall -Wno-switch-enum
+release: LDFLAGS += -s
+
+# file based targets
+libframework.a: $(OBJS)
+	ar rcs libframework.a $(OBJS)
+
+AbstractGraphicsEngine.o: $(DEPS) $(FRAMEWORK_SRC)/AbstractGraphicsEngine.cpp $(FRAMEWORK_SRC)/AbstractGraphicsEngine.h
+	$(CXX) -g ${CPPFLAGS} -c $(FRAMEWORK_SRC)/AbstractGraphicsEngine.cpp
+	
+GraphicsEngineFactory.o: $(DEPS) $(FRAMEWORK_SRC)/GraphicsEngineFactory.cpp $(FRAMEWORK_SRC)/GraphicsEngineFactory.h
+	$(CXX) -g ${CPPFLAGS} -c $(FRAMEWORK_SRC)/GraphicsEngineFactory.cpp
+	
+WindowManager.o: $(DEPS) $(FRAMEWORK_SRC)/WindowManager.cpp $(FRAMEWORK_SRC)/WindowManager.h
+	$(CXX) -g ${CPPFLAGS} -c $(FRAMEWORK_SRC)/WindowManager.cpp
+	
+BOINCClientAdapter.o: $(DEPS) $(FRAMEWORK_SRC)/BOINCClientAdapter.cpp $(FRAMEWORK_SRC)/BOINCClientAdapter.h
+	$(CXX) -g ${CPPFLAGS} -c $(FRAMEWORK_SRC)/BOINCClientAdapter.cpp
+	
+ResourceFactory.o: $(DEPS) $(FRAMEWORK_SRC)/ResourceFactory.cpp $(FRAMEWORK_SRC)/ResourceFactory.h
+	$(CXX) -g ${CPPFLAGS} -c $(FRAMEWORK_SRC)/ResourceFactory.cpp
+	
+Resource.o: $(DEPS) $(FRAMEWORK_SRC)/Resource.cpp $(FRAMEWORK_SRC)/Resource.h
+	$(CXX) -g ${CPPFLAGS} -c $(FRAMEWORK_SRC)/Resource.cpp
+
+# tools
+install:
+	cp libframework.a $(ORC_INSTALL)/lib
+
+clean:
+	rm -f $(OBJS) libframework.a
diff --git a/src/orc/Makefile b/src/orc/Makefile
index 9cfd9381fe6d8cc7d94edc20678137af7ff98833..50fc76862e9be00f190c814d714efe7807b42434 100644
--- a/src/orc/Makefile
+++ b/src/orc/Makefile
@@ -18,11 +18,15 @@
 #                                                                         #
 ###########################################################################
 
+# path settings
+ORC_SRC?=$(PWD)
+ORC_INSTALL?=$(PWD)
+
 # config values
 CXX?=g++
 DEBUGFLAGSCPP=-DDEBUG -pg -ggdb -O0
-OBJS=ResourceCompiler.o orc.o
-DEPS=Makefile ResourceCompiler.h
+OBJS=ResourceCompiler.o
+DEPS=Makefile
 
 # primary role based tagets
 default: release
@@ -35,14 +39,14 @@ release: CPPFLAGS += -O3 -Wall -Wno-switch-enum
 release: LDFLAGS += -s
 
 # file specific targets
-orc: $(DEPS) ResourceCompiler.cpp orc.cpp ${OBJS}
-	$(CXX) -g ${CPPFLAGS} ResourceCompiler.cpp orc.cpp -o orc
+orc: $(DEPS) $(ORC_SRC)/orc.cpp $(OBJS)
+	$(CXX) -g $(CPPFLAGS) $(ORC_SRC)/orc.cpp -o orc $(OBJS)
 
-orc.o: $(DEPS) orc.cpp
-	$(CXX) -g ${CPPFLAGS} -c orc.cpp
+ResourceCompiler.o: $(DEPS) $(ORC_SRC)/ResourceCompiler.cpp $(ORC_SRC)/ResourceCompiler.h
+	$(CXX) -g $(CPPFLAGS) -c $(ORC_SRC)/ResourceCompiler.cpp
 
-ResourceCompiler.o: $(DEPS) ResourceCompiler.cpp
-	$(CXX) -g ${CPPFLAGS} -c ResourceCompiler.cpp
+install:
+	cp orc $(ORC_INSTALL)/bin
 
 clean:
-	rm -f ${OBJS} orc
\ No newline at end of file
+	rm -f $(OBJS) orc
diff --git a/src/starsphere/Makefile b/src/starsphere/Makefile
index 85f6d1d05291fa83fed6356c9004b1f0b6a84f6e..c5d63b453680d07e654265ce772d60478462bd57 100644
--- a/src/starsphere/Makefile
+++ b/src/starsphere/Makefile
@@ -1,7 +1,4 @@
 ###########################################################################
-#   Copyright (C) 2004 David Hammer, Eric Myers, Bruce Allen              #
-#   Copyright (C) 2008 Bernd Machenschalk                                 #
-#                                                                         #
 #   Copyright (C) 2008 by Oliver Bock                                     #
 #   oliver.bock[AT]aei.mpg.de                                             #
 #                                                                         #
@@ -21,18 +18,32 @@
 #                                                                         #
 ###########################################################################
 
-# point this to where you installed BOINC (--prefix you gave to configure, defaults to $BOINC_PREFIX)
-BOINC_PREFIX ?= /home/oliver/development/aei/boinc
+# path settings
+STARSPHERE_SRC?=$(PWD)
+STARSPHERE_INSTALL?=$(PWD)
+
+# config values
 CXX ?= g++
 
 # variables
-LIBS = -L${BOINC_PREFIX}/lib -Bstatic $(shell sdl-config --static-libs) $(shell freetype-config --libs) -lOGLFT -lboinc_api -lboinc -Wl,-Bdynamic -lGL -lGLU
-CPPFLAGS = -DOGLFT_NO_SOLID -DOGLFT_NO_QT -I/usr/include $(shell sdl-config --cflags) $(shell freetype-config --cflags) -I${BOINC_PREFIX}/include/BOINC
+LIBS = -Wl,-Bstatic -lframework -lOGLFT -L$(STARSPHERE_INSTALL)/lib
+LIBS += $(shell $(STARSPHERE_INSTALL)/bin/freetype-config --libs)
+LIBS += -lboinc_api -lboinc -L/usr/lib
+LIBS += -Wl,-Bdynamic $(shell $(STARSPHERE_INSTALL)/bin/sdl-config --static-libs) -lGL -lGLU
+
+CPPFLAGS = -I$(FRAMEWORK_INSTALL)/include
+CPPFLAGS += $(shell $(STARSPHERE_INSTALL)/bin/sdl-config --cflags)
+CPPFLAGS += $(shell $(STARSPHERE_INSTALL)/bin/freetype-config --cflags)
+CPPFLAGS += -I$(BOINC_PREFIX)/include/BOINC -I/usr/include
+
 DEPS = Makefile
-OBJS = starlist.o snr_list.o pulsar_list.o AbstractGraphicsEngine.o GraphicsEngineFactory.o Starsphere.o StarsphereS5R3.o WindowManager.o ${RESOURCESPEC}.o Resource.o ResourceFactory.o BOINCClientAdapter.o EinsteinS5R3Adapter.o
+OBJS = Starsphere.o StarsphereS5R3.o EinsteinS5R3Adapter.o starlist.o snr_list.o pulsar_list.o $(RESOURCESPEC).o
 DEBUGFLAGSCPP = -pg -ggdb -O0
 RESOURCESPEC = resources
 
+# TODO: GraphicsEngineFactory obviously depends on the actual implementations (here starsphere)! need to change the structure! what about plugins?
+CPPFLAGS += -I$(STARSPHERE_SRC) -I$(STARSPHERE_SRC)/../framework
+
 # primary role based tagets
 default: release
 debug: starsphere
@@ -48,58 +59,42 @@ release: CPPFLAGS += -DNDEBUG -O3 -Wall -Wno-switch-enum
 release: LDFLAGS += -s
 
 # file based targets
-starsphere: $(DEPS) main.cpp $(OBJS)
-	$(CXX) -g ${CPPFLAGS} ${LDFLAGS} main.cpp -o starsphere ${OBJS} ${LIBS}
+starsphere: $(DEPS) $(STARSPHERE_SRC)/main.cpp $(OBJS)
+	$(CXX) -g $(CPPFLAGS) $(LDFLAGS) $(STARSPHERE_SRC)/main.cpp -o starsphere $(OBJS) $(LIBS)
 
-Starsphere.o: $(DEPS) Starsphere.cpp
-	$(CXX) -g ${CPPFLAGS} -c Starsphere.cpp
+Starsphere.o: $(DEPS) $(STARSPHERE_SRC)/Starsphere.cpp $(STARSPHERE_SRC)/Starsphere.h
+	$(CXX) -g $(CPPFLAGS) -c $(STARSPHERE_SRC)/Starsphere.cpp
 	
-StarsphereS5R3.o: $(DEPS) StarsphereS5R3.cpp
-	$(CXX) -g ${CPPFLAGS} -c StarsphereS5R3.cpp
+StarsphereS5R3.o: $(DEPS) $(STARSPHERE_SRC)/StarsphereS5R3.cpp $(STARSPHERE_SRC)/StarsphereS5R3.h
+	$(CXX) -g $(CPPFLAGS) -c $(STARSPHERE_SRC)/StarsphereS5R3.cpp
 
-AbstractGraphicsEngine.o: AbstractGraphicsEngine.cpp
-	$(CXX) -g ${CPPFLAGS} -c AbstractGraphicsEngine.cpp
-	
-GraphicsEngineFactory.o: GraphicsEngineFactory.cpp
-	$(CXX) -g ${CPPFLAGS} -c GraphicsEngineFactory.cpp
-	
-WindowManager.o: Makefile WindowManager.cpp
-	$(CXX) -g ${CPPFLAGS} -c WindowManager.cpp
-	
-BOINCClientAdapter.o: Makefile BOINCClientAdapter.cpp
-	$(CXX) -g ${CPPFLAGS} -c BOINCClientAdapter.cpp
-	
-EinsteinS5R3Adapter.o: Makefile EinsteinS5R3Adapter.cpp
-	$(CXX) -g ${CPPFLAGS} -c EinsteinS5R3Adapter.cpp
+EinsteinS5R3Adapter.o: Makefile $(STARSPHERE_SRC)/EinsteinS5R3Adapter.cpp $(STARSPHERE_SRC)/EinsteinS5R3Adapter.h
+	$(CXX) -g $(CPPFLAGS) -c $(STARSPHERE_SRC)/EinsteinS5R3Adapter.cpp
 
-starlist.o: $(DEPS) starlist.C
-	$(CXX) -g ${CPPFLAGS} -c starlist.C
+starlist.o: $(DEPS) $(STARSPHERE_SRC)/starlist.C
+	$(CXX) -g $(CPPFLAGS) -c $(STARSPHERE_SRC)/starlist.C
 
-snr_list.o: $(DEPS) snr_list.C
-	$(CXX) -g ${CPPFLAGS} -c snr_list.C
+snr_list.o: $(DEPS) $(STARSPHERE_SRC)/snr_list.C
+	$(CXX) -g $(CPPFLAGS) -c $(STARSPHERE_SRC)/snr_list.C
 
-pulsar_list.o: $(DEPS) pulsar_list.C
-	$(CXX) -g ${CPPFLAGS} -c pulsar_list.C
+pulsar_list.o: $(DEPS) $(STARSPHERE_SRC)/pulsar_list.C
+	$(CXX) -g $(CPPFLAGS) -c $(STARSPHERE_SRC)/pulsar_list.C
 
 # resource compiler
-ResourceFactory.o: ${RESOURCESPEC}.o Resource.o ResourceFactory.cpp ResourceFactory.h
-	$(CXX) -g ${CPPFLAGS} -c ResourceFactory.cpp -o ResourceFactory.o
-	
-Resource.o: Resource.cpp Resource.h
-	$(CXX) -g ${CPPFLAGS} -c Resource.cpp -o Resource.o
-
-${RESOURCESPEC}.o: ${RESOURCESPEC}.orc
-	orc/orc ${RESOURCESPEC}.orc ${RESOURCESPEC}.cpp
-	$(CXX) -g ${CPPFLAGS} -c ${RESOURCESPEC}.cpp -o ${RESOURCESPEC}.o
+$(RESOURCESPEC).o: $(STARSPHERE_SRC)/$(RESOURCESPEC).orc
+	$(STARSPHERE_INSTALL)/bin/orc $(STARSPHERE_SRC)/$(RESOURCESPEC).orc $(RESOURCESPEC).cpp
+	$(CXX) -g $(CPPFLAGS) -c $(RESOURCESPEC).cpp -o $(RESOURCESPEC).o
 
 
 # tools
 memcheck:
-	valgrind --tool=memcheck --track-fds=yes --time-stamp=yes --log-file=${PWD}/memcheck.out.%p --leak-check=full ${PWD}/starsphere
+	valgrind --tool=memcheck --track-fds=yes --time-stamp=yes --log-file=$(PWD)/memcheck.out.%p --leak-check=full $(PWD)/starsphere
 
 callgrind:
-	valgrind --tool=callgrind --track-fds=yes --time-stamp=yes ${PWD}/starsphere
+	valgrind --tool=callgrind --track-fds=yes --time-stamp=yes $(PWD)/starsphere
 
-clean:
-	rm -f ${RESOURCESPEC}.cpp $(OBJS) starsphere
+install:
+	cp starsphere $(STARSPHERE_INSTALL)/bin
 
+clean:
+	rm -f $(RESOURCESPEC).cpp $(OBJS) starsphere