Hi,
I´m adding some optimizations to critical's port. The problem is that the makefile he is supplying is strange for me. It seems to only have the linkage stage, but no rules to make the cpp's. Is there any trick I don´t know about makefiles that makes cpps in anyway without explicit rules?
Here the make file:
NAME = uae4all.gpe
O = o
RM = rm -f
CC = arm-linux-gcc
CXX = arm-linux-g++
STRIP = arm-linux-strip
SDL_BASE = C:/devkitGP2X/bin/arm-linux-
PROG = $(NAME)
all: $(PROG)
#FAME_CORE=1
DEFAULT_CFLAGS = `$(SDL_BASE)sdl-config --cflags`
LDFLAGS = `$(SDL_BASE)sdl-config --libs` -lSDL_mixer -lSDL -lmikmod -static
#-lSDL_mixer -lSDL
MORE_CFLAGS = -O3 -Isrc/ -Isrc/include/ -Isrc/menu -Isrc/vkbd -fomit-frame-pointer -Wno-unused -Wno-format -DUSE_SDL -DGCCCONSTFUNC="__attribute__((const))" -DUSE_UNDERSCORE -fno-exceptions -DUNALIGNED_PROFITABLE -DREGPARAM="__attribute__((regparm(3)))" -DOPTIMIZED_FLAGS -D__inline__=__inline__ -DSHM_SUPPORT_LINKS=0 -DOS_WITHOUT_MEMORY_MANAGEMENT -DVKBD_ALWAYS
MORE_CFLAGS+= -DROM_PATH_PREFIX=\"./roms/\" -DDATA_PREFIX=\"./data/\"
#MORE_CFLAGS+= -DUAE4ALL_NO_USE_RESTRICT
#MORE_CFLAGS+= -DNO_SOUND
MORE_CFLAGS+= -DGP2X
#MORE_CFLAGS+= -DDOUBLEBUFFER
MORE_CFLAGS+= -DNO_THREADS
#MORE_CFLAGS+= -DUAE_MEMORY_ACCESS
#MORE_CFLAGS+= -DSAFE_MEMORY_ACCESS
#MORE_CFLAGS+= -DERROR_WHEN_MEMORY_OVERRUN
#MORE_CFLAGS+= -DDEBUG_UAE4ALL
#MORE_CFLAGS+= -DDEBUG_UAE4ALL_FFLUSH
#MORE_CFLAGS+= -DDEBUG_M68K
#MORE_CFLAGS+= -DDEBUG_INTERRUPTS
#MORE_CFLAGS+= -DDEBUG_CIA
#MORE_CFLAGS+= -DDEBUG_SOUND
#MORE_CFLAGS+= -DDEBUG_MEMORY
#MORE_CFLAGS+= -DDEBUG_DISK
#MORE_CFLAGS+= -DDEBUG_CUSTOM
#MORE_CFLAGS+= -DDEBUG_EVENTS
#MORE_CFLAGS+= -DDEBUG_GFX -DDEBUG_BLITTER
#MORE_CFLAGS+= -DDEBUG_FRAMERATE
#MORE_CFLAGS+= -DAUTO_FRAMERATE=1400
#MORE_CFLAGS+= -DMAX_AUTO_FRAMERATE=4400
#MORE_CFLAGS+= -DAUTO_FRAMERATE_SOUND
#MORE_CFLAGS+= -DSTART_DEBUG=126
#MORE_CFLAGS+= -DMAX_AUTOEVENTS=1270000
#MORE_CFLAGS+= -DAUTO_RUN
#MORE_CFLAGS+= -DPROFILER_UAE4ALL
CFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)
OBJS = \
src/audio.o \
src/autoconf.o \
src/blitfunc.o \
src/blittable.o \
src/blitter.o \
src/cia.o \
src/compiler.o \
src/custom.o \
src/disk.o \
src/drawing.o \
src/ersatz.o \
src/gfxutil.o \
src/identify.o \
src/keybuf.o \
src/main.o \
src/md-support.o \
src/memory.o \
src/missing.o \
src/gui.o \
src/od-joy.o \
src/sound.o \
src/sdlgfx.o \
src/writelog.o \
src/zfile.o \
src/cpuspeed/cpu_speed.o \
src/menu/fade.o \
src/menu/menu.o \
src/menu/menu_load.o \
src/menu/menu_main.o \
src/menu/menu_overclock.o \
src/vkbd/vkbd.o \
src/gp2x/volumecontrol.o \
src/gp2x/inputmode.o
ifdef FAME_CORE
CFLAGS+=-DUSE_FAME_CORE
src/m68k/fame/fame.o: src/m68k/fame/fame.asm
nasm -f elf src/m68k/fame/fame.asm
OBJS += \
src/m68k/fame/fame.o \
src/m68k/fame/m68k_intrf.o
else
OBJS += \
src/m68k/uae/newcpu.o \
src/m68k/uae/readcpu.o \
src/m68k/uae/cpudefs.o \
src/m68k/uae/fpp.o \
src/m68k/uae/cpustbl.o \
src/m68k/uae/cpuemu.o
endif
CPPFLAGS = $(CFLAGS)
$(PROG): $(OBJS)
$(CC) $(CFLAGS) -o $(PROG) $(OBJS) $(LDFLAGS)
$(STRIP) $(PROG)
run: $(PROG)
./$(PROG)
clean:
$(RM) $(PROG) $(OBJS)
I´m adding some optimizations to critical's port. The problem is that the makefile he is supplying is strange for me. It seems to only have the linkage stage, but no rules to make the cpp's. Is there any trick I don´t know about makefiles that makes cpps in anyway without explicit rules?
Here the make file:
NAME = uae4all.gpe
O = o
RM = rm -f
CC = arm-linux-gcc
CXX = arm-linux-g++
STRIP = arm-linux-strip
SDL_BASE = C:/devkitGP2X/bin/arm-linux-
PROG = $(NAME)
all: $(PROG)
#FAME_CORE=1
DEFAULT_CFLAGS = `$(SDL_BASE)sdl-config --cflags`
LDFLAGS = `$(SDL_BASE)sdl-config --libs` -lSDL_mixer -lSDL -lmikmod -static
#-lSDL_mixer -lSDL
MORE_CFLAGS = -O3 -Isrc/ -Isrc/include/ -Isrc/menu -Isrc/vkbd -fomit-frame-pointer -Wno-unused -Wno-format -DUSE_SDL -DGCCCONSTFUNC="__attribute__((const))" -DUSE_UNDERSCORE -fno-exceptions -DUNALIGNED_PROFITABLE -DREGPARAM="__attribute__((regparm(3)))" -DOPTIMIZED_FLAGS -D__inline__=__inline__ -DSHM_SUPPORT_LINKS=0 -DOS_WITHOUT_MEMORY_MANAGEMENT -DVKBD_ALWAYS
MORE_CFLAGS+= -DROM_PATH_PREFIX=\"./roms/\" -DDATA_PREFIX=\"./data/\"
#MORE_CFLAGS+= -DUAE4ALL_NO_USE_RESTRICT
#MORE_CFLAGS+= -DNO_SOUND
MORE_CFLAGS+= -DGP2X
#MORE_CFLAGS+= -DDOUBLEBUFFER
MORE_CFLAGS+= -DNO_THREADS
#MORE_CFLAGS+= -DUAE_MEMORY_ACCESS
#MORE_CFLAGS+= -DSAFE_MEMORY_ACCESS
#MORE_CFLAGS+= -DERROR_WHEN_MEMORY_OVERRUN
#MORE_CFLAGS+= -DDEBUG_UAE4ALL
#MORE_CFLAGS+= -DDEBUG_UAE4ALL_FFLUSH
#MORE_CFLAGS+= -DDEBUG_M68K
#MORE_CFLAGS+= -DDEBUG_INTERRUPTS
#MORE_CFLAGS+= -DDEBUG_CIA
#MORE_CFLAGS+= -DDEBUG_SOUND
#MORE_CFLAGS+= -DDEBUG_MEMORY
#MORE_CFLAGS+= -DDEBUG_DISK
#MORE_CFLAGS+= -DDEBUG_CUSTOM
#MORE_CFLAGS+= -DDEBUG_EVENTS
#MORE_CFLAGS+= -DDEBUG_GFX -DDEBUG_BLITTER
#MORE_CFLAGS+= -DDEBUG_FRAMERATE
#MORE_CFLAGS+= -DAUTO_FRAMERATE=1400
#MORE_CFLAGS+= -DMAX_AUTO_FRAMERATE=4400
#MORE_CFLAGS+= -DAUTO_FRAMERATE_SOUND
#MORE_CFLAGS+= -DSTART_DEBUG=126
#MORE_CFLAGS+= -DMAX_AUTOEVENTS=1270000
#MORE_CFLAGS+= -DAUTO_RUN
#MORE_CFLAGS+= -DPROFILER_UAE4ALL
CFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)
OBJS = \
src/audio.o \
src/autoconf.o \
src/blitfunc.o \
src/blittable.o \
src/blitter.o \
src/cia.o \
src/compiler.o \
src/custom.o \
src/disk.o \
src/drawing.o \
src/ersatz.o \
src/gfxutil.o \
src/identify.o \
src/keybuf.o \
src/main.o \
src/md-support.o \
src/memory.o \
src/missing.o \
src/gui.o \
src/od-joy.o \
src/sound.o \
src/sdlgfx.o \
src/writelog.o \
src/zfile.o \
src/cpuspeed/cpu_speed.o \
src/menu/fade.o \
src/menu/menu.o \
src/menu/menu_load.o \
src/menu/menu_main.o \
src/menu/menu_overclock.o \
src/vkbd/vkbd.o \
src/gp2x/volumecontrol.o \
src/gp2x/inputmode.o
ifdef FAME_CORE
CFLAGS+=-DUSE_FAME_CORE
src/m68k/fame/fame.o: src/m68k/fame/fame.asm
nasm -f elf src/m68k/fame/fame.asm
OBJS += \
src/m68k/fame/fame.o \
src/m68k/fame/m68k_intrf.o
else
OBJS += \
src/m68k/uae/newcpu.o \
src/m68k/uae/readcpu.o \
src/m68k/uae/cpudefs.o \
src/m68k/uae/fpp.o \
src/m68k/uae/cpustbl.o \
src/m68k/uae/cpuemu.o
endif
CPPFLAGS = $(CFLAGS)
$(PROG): $(OBJS)
$(CC) $(CFLAGS) -o $(PROG) $(OBJS) $(LDFLAGS)
$(STRIP) $(PROG)
run: $(PROG)
./$(PROG)
clean:
$(RM) $(PROG) $(OBJS)