- Timestamp:
- 07/23/2017 04:41:10 PM (7 years ago)
- Branches:
- master
- Children:
- 8e1b163
- Parents:
- 2a75e87
- File:
-
- 1 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)
Note:
See TracChangeset
for help on using the changeset viewer.