Changeset 4f3fe48 in buchla-emu
- Timestamp:
- 07/23/2017 04:41:10 PM (8 years ago)
- Branches:
- master
- Children:
- 8e1b163
- Parents:
- 2a75e87
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r2a75e87 r4f3fe48 1 1 OS := $(shell uname) 2 2 3 ifndef WIN 4 GCC := gcc 3 5 SDL2 := /opt/sdl2 6 else 7 GCC := x86_64-w64-mingw32-gcc 8 SDL2 := /opt/sdl2-win 9 endif 10 4 11 SDL2_INC := $(SDL2)/include 5 12 SDL2_LIB := $(SDL2)/lib … … 16 23 -I cpu -I emu -I build -I $(SDL2_INC) 17 24 25 ifndef WIN 18 26 ifeq ($(OS), Linux) 19 27 FLAGS_EMU += -D EMU_LINUX … … 42 50 -l iconv 43 51 endif 52 else 53 FLAGS_EMU += -D EMU_WIN 54 FLAGS_LNK := $(FLAGS) -Wall -Wextra 55 LIBS := -l mingw32 \ 56 $(SDL2_LIB)/libSDL2.a \ 57 $(SDL2_LIB)/libSDL2main.a \ 58 $(SDL2_LIB)/libSDL2_ttf.a \ 59 $(SDL2_LIB)/libfreetype.a \ 60 -l gdi32 \ 61 -l imm32 \ 62 -l ole32 \ 63 -l oleaut32 \ 64 -l version \ 65 -l winmm 66 endif 44 67 45 68 HEADERS := $(wildcard cpu/*.h) $(wildcard emu/*.h) … … 67 90 68 91 build/%.o: build/%.c $(HEADERS) 69 gcc$(FLAGS_CPU) -c -o $@ $<92 $(GCC) $(FLAGS_CPU) -c -o $@ $< 70 93 71 94 CPU_C := m68kcpu.c m68kdasm.c … … 74 97 75 98 build/%.o: cpu/%.c $(HEADERS) $(GEN_HP) | build 76 gcc$(FLAGS_CPU) -c -o $@ $<99 $(GCC) $(FLAGS_CPU) -c -o $@ $< 77 100 78 101 EMU_C := main.c cpu.c vid.c fpu.c tim.c lcd.c ser.c mid.c fdd.c snd.c \ … … 82 105 83 106 build/%.o: emu/%.c $(HEADERS) | build 84 gcc$(FLAGS_EMU) -c -o $@ $<107 $(GCC) $(FLAGS_EMU) -c -o $@ $< 85 108 86 109 buchla: $(CPU_OP) $(GEN_OP) $(EMU_OP) 87 gcc$(FLAGS_LNK) -o buchla \110 $(GCC) $(FLAGS_LNK) -o buchla \ 88 111 $(CPU_OP) $(GEN_OP) $(EMU_OP) \ 89 112 $(LIBS) -
readme.txt
r2a75e87 r4f3fe48 32 32 https://www.freetype.org/ 33 33 34 Currently, the emulator supports Linux and OS X. A port to Windows35 should be pretty easy, given that it doesn't use any platform-specific 36 features, just C99 and SDL2.34 Currently, we build the emulator code natively on Linux and OS X. The 35 Windows version is cross-compiled on Linux using a x86_64-w64-mingw32 36 toolchain. 37 37 38 Our Makefile expects all of the above libraries to reside in 39 /opt/sdl2. This is how we typically install them:38 For Linux and OS X, our Makefile expects all of the above libraries to 39 reside in /opt/sdl2. This is how we typically install them: 40 40 41 41 # Build and install FreeType first … … 85 85 86 86 from the top-level directory of this repository to build the emulator. 87 88 The cross-build for Windows is done similarly, with the following 89 differences when configuring the libraries: 90 91 * We use "--prefix=/opt/sdl2-win" instead of "--prefix=/opt/sdl2", 92 so that the Windows versions of the libraries go to a different 93 directory. 94 95 * We additionally specify "--host=x86_64-w64-mingw32" to enable 96 cross-compilation. 97 98 Then, to cross-build the emulator, invoke 99 100 make buchla WIN=1 101 102 from the top-level directory of this repository. 87 103 88 104
Note:
See TracChangeset
for help on using the changeset viewer.