fix crash when specifying --source on command line
[rofl0r-gnuboy.git] / Makefile.win
blobc52c905c1e92f7237050b323f17503ebeeef9428
2 CC = gcc
3 AS = $(CC)
4 LD = $(CC)
6 CFLAGS = -O3 -I./asm/i386 -Dmain=SDL_main
7 LDFLAGS = -s -lmingw32 -lSDLmain -lSDL
8 ASFLAGS = -x assembler-with-cpp
10 SYS_DEFS = -DIS_LITTLE_ENDIAN -DALT_PATH_SEP -DUSE_ASM
11 ASM_OBJS = asm/i386/cpu.o asm/i386/lcd.o asm/i386/refresh.o
12 #SND_OBJS = sys/dummy/nosound.o
14 SYS_OBJS = $(ASM_OBJS) $(SND_OBJS) sys/windows/windows.o sys/windows/resource.o
15 SYS_INCS = -I./sys/windows
17 SDL_OBJS = sys/sdl/sdl.o sys/sdl/keymap.o
18 SDL_LIBS = -lSDL
20 all: gnuboy
22 include Rules
24 %.o: %.rc
25         windres -o $@ $<
27 gnuboy: $(OBJS) $(SYS_OBJS) $(SDL_OBJS)
28         $(LD) $(LDFLAGS) $(OBJS) $(SYS_OBJS) $(SDL_OBJS) -o $@ $(SDL_LIBS)
30 clean:
31         rm -f gnuboy.exe *.o sys/*.o sys/*/*.o asm/*/*.o