comparison Makefile @ 741:80a67be1770b

Initial work on Windows port
author Michael Pavone <pavone@retrodev.com>
date Tue, 01 Apr 2014 19:43:58 -0700
parents 29d99db6f55d
children 2e1b3b258523
comparison
equal deleted inserted replaced
589:2dde38c1744f 741:80a67be1770b
1
2 ifdef WINDOWS
3
4 MEM:=mem_win.o
5 BLASTEM:=blastem.exe
6 RUNTIME32:=runtime_win.S
7
8 CC:=wine gcc.exe
9 CFLAGS:=-O2 -std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -DDISABLE_OPENGL -I"C:/MinGW/usr/include/SDL"
10 LDFLAGS:= -L"C:/MinGW/usr/lib" -lm -lmingw32 -lSDLmain -lSDL -mwindows
11 CPU:=i686
12
13 else
14
15 MEM:=mem.o
16 BLASTEM:=blastem
17 RUNTIME32:=runtime_32.S
18
1 ifdef NOGL 19 ifdef NOGL
2 LIBS=sdl 20 LIBS=sdl
3 else 21 else
4 LIBS=sdl glew gl 22 LIBS=sdl glew gl
5 endif 23 endif
20 endif 38 endif
21 39
22 ifndef CPU 40 ifndef CPU
23 CPU:=$(shell uname -m) 41 CPU:=$(shell uname -m)
24 endif 42 endif
43 endif
25 44
26 45
27 46 TRANSOBJS=gen.o backend.o $(MEM)
28 TRANSOBJS=gen.o backend.o mem.o
29 M68KOBJS=68kinst.o m68k_core.o 47 M68KOBJS=68kinst.o m68k_core.o
30 ifeq ($(CPU),x86_64) 48 ifeq ($(CPU),x86_64)
31 M68KOBJS+= runtime.o m68k_core_x86.o 49 M68KOBJS+= runtime.o m68k_core_x86.o
32 TRANSOBJS+= gen_x86.o backend_x86.o 50 TRANSOBJS+= gen_x86.o backend_x86.o
33 else 51 else
34 ifeq ($(CPU),i686) 52 ifeq ($(CPU),i686)
35 M68KOBJS+= runtime_32.o m68k_core_x86.o 53 M68KOBJS+= $(RUNTIME32) m68k_core_x86.o
36 TRANSOBJS+= gen_x86.o backend_x86.o 54 TRANSOBJS+= gen_x86.o backend_x86.o
37 NOZ80:=1 55 NOZ80:=1
38 endif 56 endif
39 endif 57 endif
40 58
59 endif 77 endif
60 78
61 79
62 all : dis zdis stateview vgmplay blastem 80 all : dis zdis stateview vgmplay blastem
63 81
64 blastem : $(MAINOBJS) 82 $(BLASTEM) : $(MAINOBJS)
65 $(CC) -o blastem $(MAINOBJS) $(LDFLAGS) 83 $(CC) -o $(BLASTEM) $(MAINOBJS) $(LDFLAGS)
66 84
67 dis : dis.o 68kinst.o 85 dis : dis.o 68kinst.o
68 $(CC) -o dis dis.o 68kinst.o 86 $(CC) -o dis dis.o 68kinst.o
69 87
70 zdis : zdis.o z80inst.o 88 zdis : zdis.o z80inst.o