Build .deb package, try to fix endianness issues
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c57c91..732aa4b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,6 +26,21 @@
 		WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
 endif()
 
+find_library(readline SDL2 GL GLU GLEW m rt pthread)
+
 add_executable(6502 main.c cpu.c cpu.h dbg.c dbg.h 
 	instructions.h gui.h gui.c screen.h screen.c common.h common.c)
 target_link_libraries(6502 readline SDL2 GL GLU GLEW m rt pthread)
+
+install(TARGETS 6502)
+
+set(CPACK_GENERATOR "DEB")
+set(CPACK_DEBIAN_PACKAGE_MAINTAINER "swissChili")
+set(CPACK_DEBIAN_PACKAGE_DEPENDS "libsdl2-dev, libreadline-dev, libglew-dev")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "6502 emulator, debugger, and assembler")
+set(CPACK_PACKAGE_VERSION_MAJOR 0)
+set(CPACK_PACKAGE_VERSION_MINOR 1)
+set(CPACK_PACKAGE_VERSION_PATCH 0)
+set(CPACK_PACKAGE_FILE_NAME "6502")
+
+include(CPack)