-LIBS=-lGL -lX11 -lXext -lXxf86vm $(shell freetype-config --libs) $(shell libpq3-config) -lpqxx
-CCBS_BIGSCREEN_OBJS=ccbs_bigscreen.o glwindow.o
+LIBS=$(shell freetype-config --libs) -lpqxx $(shell sdl-config --libs)
+
+CCBS_BIGSCREEN_SQL_OBJS=fetch_current_tournament.o fetch_list_of_active_groups.o \
+ fetch_list_of_finished_groups.o \
+ fetch_max_score_for_songs.o fetch_max_score_for_players.o fetch_group.o \
+ fetch_needs_update.o fetch_highscore.o fetch_top_scores_for_tournament.o \
+ fetch_top_chosen_songs_for_tournament.o fetch_auxilliary_screens.o
+CCBS_BIGSCREEN_SCREEN_OBJS=groupscreen.o top10scorescreen.o top5chosenscreen.o splitscreen.o rotatescreen.o screen.o
+CCBS_BIGSCREEN_MAIN_OBJS=ccbs_bigscreen.o flagtrigger.o widestring.o fonts.o
+CCBS_BIGSCREEN_OBJS=$(CCBS_BIGSCREEN_SQL_OBJS) $(CCBS_BIGSCREEN_SCREEN_OBJS) $(CCBS_BIGSCREEN_MAIN_OBJS)