-PROGRAMS=test_display_no_ssl
-HEADERS=test_display_base.h basic_event_loop.h ring.h
-SOURCES=test_display_base.c test_display_no_ssl.c basic_event_loop.c
+PROGRAMS=spiceterm
+
+HEADERS=test_display_base.h basic_event_loop.h glyphs.h spiceterm.h
+SOURCES=test_display_base.c basic_event_loop.c
all: ${PROGRAMS}
-test_display_no_ssl: ${SOURCES} ${HEADERS}
- gcc ${SOURCES} -o $@ $(shell pkg-config --cflags --libs spice-protocol,spice-server)
+spiceterm: ${SOURCES} ${HEADERS} spiceterm.c
+ gcc -Werror -Wall -Wtype-limits ${SOURCES} spiceterm.c -o $@ -lutil $(shell pkg-config --cflags gdk-3.0) $(shell pkg-config --cflags --libs gthread-2.0,spice-protocol,spice-server)
.PHONY: test
-test: test_display_no_ssl
- ./test_display_no_ssl & remote-viewer spice://localhost:5912
+test: spiceterm
+ ./spiceterm & remote-viewer spice://localhost:5912
+
+.PHONY: distclean
+distclean: clean
+
+.PHONY: clean
+clean:
+ rm -rf *~ ${PROGRAMS}
\ No newline at end of file