mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-09-11 01:03:15 +02:00
134 lines
3.6 KiB
Makefile
134 lines
3.6 KiB
Makefile
![]() |
|
||
|
# Makefile for genplus SDL
|
||
|
#
|
||
|
# (c) 1999, 2000, 2001, 2002, 2003 Charles MacDonald
|
||
|
# modified by Eke-Eke <eke_eke31@yahoo.fr>
|
||
|
#
|
||
|
# Defines :
|
||
|
# -DLSB_FIRST : for little endian systems.
|
||
|
# -DLOGERROR : enable message logging
|
||
|
# -DLOGVDP : enable VDP debug messages
|
||
|
# -DLOGSOUND : enable AUDIO debug messages
|
||
|
# -D8BPP_RENDERING - configure for 8-bit pixels (RGB332)
|
||
|
# -D15BPP_RENDERING - configure for 15-bit pixels (RGB555)
|
||
|
# -D16BPP_RENDERING - configure for 16-bit pixels (RGB565)
|
||
|
# -D32BPP_RENDERING - configure for 32-bit pixels (RGB888)
|
||
|
|
||
|
NAME = gen_sdl.exe
|
||
|
|
||
|
CC = gcc
|
||
|
CFLAGS = `sdl-config --cflags` -march=i686 -O6 -fomit-frame-pointer -Wall -Wno-strict-aliasing
|
||
|
#-g -ggdb -pg
|
||
|
#-fomit-frame-pointer
|
||
|
#LDFLAGS = -pg
|
||
|
DEFINES = -DLSB_FIRST -DUSE_16BPP_RENDERING
|
||
|
|
||
|
INCLUDES = -Isource -Isource/z80 -Isource/m68k -Isource/sound -Isource/input_hw -Isource/cart_hw -Isource/cart_hw/svp -Isource/ntsc -Isource/win
|
||
|
LIBS = `sdl-config --libs` -lz -lm
|
||
|
|
||
|
OBJDIR = ./build_sdl
|
||
|
|
||
|
OBJECTS = $(OBJDIR)/z80.o
|
||
|
|
||
|
OBJECTS += $(OBJDIR)/m68kcpu.o
|
||
|
|
||
|
OBJECTS += $(OBJDIR)/genesis.o \
|
||
|
$(OBJDIR)/vdp_ctrl.o \
|
||
|
$(OBJDIR)/vdp_render.o \
|
||
|
$(OBJDIR)/system.o \
|
||
|
$(OBJDIR)/io_ctrl.o \
|
||
|
$(OBJDIR)/mem68k.o \
|
||
|
$(OBJDIR)/memz80.o \
|
||
|
$(OBJDIR)/membnk.o \
|
||
|
$(OBJDIR)/state.o \
|
||
|
$(OBJDIR)/loadrom.o
|
||
|
|
||
|
OBJECTS += $(OBJDIR)/input.o \
|
||
|
$(OBJDIR)/gamepad.o \
|
||
|
$(OBJDIR)/lightgun.o \
|
||
|
$(OBJDIR)/mouse.o \
|
||
|
$(OBJDIR)/activator.o \
|
||
|
$(OBJDIR)/xe_a1p.o \
|
||
|
$(OBJDIR)/teamplayer.o \
|
||
|
$(OBJDIR)/paddle.o \
|
||
|
$(OBJDIR)/sportspad.o \
|
||
|
$(OBJDIR)/terebi_oekaki.o
|
||
|
|
||
|
OBJECTS += $(OBJDIR)/sound.o \
|
||
|
$(OBJDIR)/sn76489.o \
|
||
|
$(OBJDIR)/ym2413.o \
|
||
|
$(OBJDIR)/ym2612.o
|
||
|
|
||
|
OBJECTS += $(OBJDIR)/Fir_Resampler.o
|
||
|
OBJECTS += $(OBJDIR)/blip.o
|
||
|
OBJECTS += $(OBJDIR)/eq.o
|
||
|
|
||
|
OBJECTS += $(OBJDIR)/sram.o \
|
||
|
$(OBJDIR)/svp.o \
|
||
|
$(OBJDIR)/ssp16.o \
|
||
|
$(OBJDIR)/ggenie.o \
|
||
|
$(OBJDIR)/areplay.o \
|
||
|
$(OBJDIR)/gg_eeprom.o \
|
||
|
$(OBJDIR)/md_eeprom.o \
|
||
|
$(OBJDIR)/md_cart.o \
|
||
|
$(OBJDIR)/sms_cart.o
|
||
|
|
||
|
OBJECTS += $(OBJDIR)/sms_ntsc.o \
|
||
|
$(OBJDIR)/md_ntsc.o
|
||
|
|
||
|
OBJECTS += $(OBJDIR)/main.o \
|
||
|
$(OBJDIR)/config.o \
|
||
|
$(OBJDIR)/error.o \
|
||
|
$(OBJDIR)/unzip.o \
|
||
|
$(OBJDIR)/fileio.o
|
||
|
|
||
|
OBJECTS += $(OBJDIR)/icon.o
|
||
|
|
||
|
all: $(NAME)
|
||
|
|
||
|
$(NAME): $(OBJDIR) $(OBJECTS)
|
||
|
$(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@
|
||
|
|
||
|
$(OBJDIR) :
|
||
|
@[ -d $@ ] || mkdir -p $@
|
||
|
|
||
|
$(OBJDIR)/%.o : source/%.c source/%.h
|
||
|
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
|
||
|
|
||
|
$(OBJDIR)/%.o : source/sound/%.c source/sound/%.h
|
||
|
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
|
||
|
|
||
|
$(OBJDIR)/%.o : source/input_hw/%.c source/input_hw/%.h
|
||
|
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
|
||
|
|
||
|
$(OBJDIR)/%.o : source/cart_hw/%.c source/cart_hw/%.h
|
||
|
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
|
||
|
|
||
|
$(OBJDIR)/%.o : source/cart_hw/svp/%.c
|
||
|
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
|
||
|
|
||
|
$(OBJDIR)/%.o : source/cart_hw/svp/%.c source/cart_hw/svp/%.h
|
||
|
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
|
||
|
|
||
|
$(OBJDIR)/%.o : source/z80/%.c source/z80/%.h
|
||
|
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
|
||
|
|
||
|
$(OBJDIR)/%.o : source/m68k/%.c source/m68k/%.h
|
||
|
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
|
||
|
|
||
|
$(OBJDIR)/%.o : source/ntsc/%.c source/ntsc/%.h
|
||
|
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
|
||
|
|
||
|
$(OBJDIR)/%.o : source/win/%.c source/win/%.h
|
||
|
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
|
||
|
|
||
|
$(OBJDIR)/icon.o :
|
||
|
windres source/win/icon.rc $@
|
||
|
|
||
|
pack :
|
||
|
strip $(NAME)
|
||
|
upx -9 $(NAME)
|
||
|
|
||
|
clean:
|
||
|
rm -f $(OBJECTS) $(NAME)
|