Subversion Repositories psp

[/] [trunk/] [genplus/] [makefile.mgw] - Rev 62

Compare with Previous | Blame | View Log

# Genesis Plus - Sega Mega Drive emulator
# (c) 1999, 2000, 2001, 2002, 2003  Charles MacDonald

# -DLSB_FIRST - Leave undefined for big-endian processors.
# -DDEBUG     - Enable debugging code
# -DX86_ASM   - Enable inline x86 assembly code in Z80 emulator

CC      =       gcc
AS      =       nasm -f coff
LDFLAGS =       
FLAGS   =       -I. -Icpu -Iwin -Isound \
                -Id:/sdl/include \
                -Werror -Wall \
                -DLSB_FIRST -DX86_ASM \
                -O6 -march=pentium -fomit-frame-pointer

LIBS    =       -lz -lm -lmingw32 -Ld:/sdl/lib -lSDLmain -lSDL obj/m68k.oa

OBJ     =       obj/z80.oa      \
                obj/genesis.o   \
                obj/vdp.o       \
                obj/render.o    \
                obj/system.o    \
                obj/unzip.o     \
                obj/fileio.o    \
                obj/loadrom.o   \
                obj/io.o        \
                obj/mem68k.o    \
                obj/memz80.o    \
                obj/membnk.o    \
                obj/memvdp.o
                
OBJ     +=      obj/sound.o     \
                obj/fm.o        \
                obj/sn76496.o
                
OBJ     +=      obj/main.o      \
                obj/error.o

EXE     =       gen.exe

all     :       $(EXE)

$(EXE)  :       $(OBJ) shared.h
                $(CC) -o $(EXE) $(OBJ) $(LIBS) $(LDFLAGS)
                
obj/%.oa :      cpu/%.c cpu/%.h
                $(CC) -c $< -o $@ $(FLAGS)

obj/%.o :       %.c %.h
                $(CC) -c $< -o $@ $(FLAGS)
                
obj/%.o :       win/%.s
                $(AS) $< -o $@
                
obj/%.o :       sound/%.c sound/%.h             
                $(CC) -c $< -o $@ $(FLAGS)
                
obj/%.o :       cpu/%.c cpu/%.h         
                $(CC) -c $< -o $@ $(FLAGS)

obj/%.o :       win/%.c win/%.h         
                $(CC) -c $< -o $@ $(FLAGS)
                
pack    :
                strip $(EXE)
                upx -1 $(EXE)           

clean   :               
                rm -f obj/*.o
                rm -f *.bak
                rm -f *.exe
                rm -f *.log
                rm -f *.wav
                rm -f *.zip
cleancpu :              
                rm -f obj/z80.oa

makedir :
                mkdir obj
                
archive:                
                pk -add -max -excl=bak -excl=out \
                -excl=test -excl=obj mdsrc.zip -dir=current
                
#
# end of makefile
#

Compare with Previous | Blame | View Log