Changeset 2f9f352 in buchla-emu
- Timestamp:
- 07/22/2017 03:27:04 PM (7 years ago)
- Branches:
- master
- Children:
- d94a7be
- Parents:
- de65155
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
rde65155 r2f9f352 18 18 ifeq ($(OS), Linux) 19 19 FLAGS_LNK := $(FLAGS) -pthread -Wall -Wextra 20 LIBS := $(SDL2_LIB)/libSDL2.a -ldl -lm 20 LIBS := $(SDL2_LIB)/libSDL2.a \ 21 $(SDL2_LIB)/libSDL2_ttf.a \ 22 $(SDL2_LIB)/libfreetype.a \ 23 -ldl -lm 21 24 endif 22 25 … … 24 27 FLAGS_LNK := $(FLAGS) -Wall -Wextra 25 28 LIBS := $(SDL2_LIB)/libSDL2.a \ 29 $(SDL2_LIB)/libSDL2_ttf.a \ 30 $(SDL2_LIB)/libfreetype.a \ 26 31 -framework AppKit \ 27 32 -framework AudioToolbox \ -
emu/all.h
rde65155 r2f9f352 27 27 28 28 #include <SDL2/SDL.h> 29 #include <SDL2/SDL_ttf.h> 29 30 30 31 #define inf(...) SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, __VA_ARGS__); -
emu/sdl.c
rde65155 r2f9f352 32 32 33 33 SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_VERBOSE); 34 35 if (TTF_Init() < 0) { 36 fail("TTF_Init() failed: %s", TTF_GetError()); 37 } 34 38 } 35 39 36 40 void sdl_quit(void) 37 41 { 42 TTF_Quit(); 38 43 SDL_Quit(); 39 44 } -
readme.txt
rde65155 r2f9f352 26 26 https://libsdl.org/ 27 27 28 The SDL2 website also hosts the SDL2_ttf project, which adds support 29 for TrueType fonts to SDL2. SDL2_ttf, in turn, requires the FreeType 30 library, which is available from the FreeType website: 31 32 https://www.freetype.org/ 33 28 34 Currently, the emulator supports Linux and OS X. A port to Windows 29 35 should be pretty easy, given that it doesn't use any platform-specific 30 36 features, just C99 and SDL2. 31 37 32 Our Makefile expects SDL2 to reside in /opt/sdl2. This is how we 33 typically install it: 38 Our Makefile expects all of the above libraries to reside in 39 /opt/sdl2. This is how we typically install them: 40 41 # Build and install FreeType first 42 43 tar zxvf freetype-2.7.1.tar.gz 44 cd freetype-2.7.1 45 mkdir build 46 cd build 47 48 # Skip the optional features (compressed fonts, etc.) that would 49 # create more dependencies 50 51 ../configure --prefix=/opt/sdl2 \ 52 --without-zlib --without-bzip2 --without-png --without-harfbuzz 53 54 make 55 make install 56 57 # Then build and install SDL2 34 58 35 59 tar zxvf SDL2-2.0.5.tar.gz 36 60 cd SDL2-2.0.5 37 38 61 mkdir build 39 62 cd build 40 63 41 64 ../configure --prefix=/opt/sdl2 65 42 66 make 43 67 make install 44 68 45 Now that we have SDL2 in place, invoke 69 # Build and install SDL2_ttf last 70 71 tar zxvf SDL2_ttf-2.0.14.tar.gz 72 cd SDL2_ttf-2.0.14 73 mkdir build 74 cd build 75 76 ../configure --prefix=/opt/sdl2 77 78 make 79 make install 80 81 Now that we have everything in place, invoke 46 82 47 83 make buchla
Note:
See TracChangeset
for help on using the changeset viewer.