Index: Makefile
===================================================================
--- Makefile	(revision 4edbd1cda3b7b1d5abdfff4db7be4767ec6c05d3)
+++ Makefile	(revision ff8d800308997707a2040c22e309bbd0585ee959)
@@ -1,3 +1,7 @@
-FLAGS :=		-std=c99 -O2 -gdwarf-4
+SDL2 :=			/opt/sdl2
+SDL2_INC :=		$(SDL2)/include
+SDL2_LIB :=		$(SDL2)/lib
+
+FLAGS :=		-std=c99 -pthread -O2 -gdwarf-4
 
 FLAGS_CPU :=	$(FLAGS) -I cpu -I build
@@ -8,5 +12,5 @@
 				-Wpedantic -Wconversion -Wsign-conversion -Wshadow \
 				-Wstrict-prototypes -Wmissing-declarations -Wredundant-decls \
-				-I cpu -I emu -I build
+				-I cpu -I emu -I build -I $(SDL2_INC)
 
 FLAGS_LNK :=	$(FLAGS) -Wall -Wextra
@@ -45,5 +49,5 @@
 				gcc $(FLAGS_CPU) -c -o $@ $<
 
-EMU_C :=		main.c
+EMU_C :=		main.c cpu.c sdl.c
 EMU_O :=		$(EMU_C:.c=.o)
 EMU_OP :=		$(EMU_O:%=build/%)
@@ -53,9 +57,14 @@
 
 buchla:			$(CPU_OP) $(GEN_OP)	$(EMU_OP)
-				gcc $(FLAGS_LNK) -o buchla $(CPU_OP) $(GEN_OP) $(EMU_OP)
+				gcc $(FLAGS_LNK) -o buchla \
+				$(CPU_OP) $(GEN_OP) $(EMU_OP) \
+				$(SDL2_LIB)/libSDL2.a -ldl -lm
+
+run:			buchla
+				./buchla
 
 val:			buchla
 				valgrind --leak-resolution=high --track-fds=yes --leak-check=full \
-				--show-reachable=yes ./buchla
+				--show-reachable=yes --suppressions=buchla.supp ./buchla
 
 clean:
