de-duplicate / tidy and merge makefiles
This commit is contained in:
parent
c5610e7acd
commit
7c1da7edb7
2 changed files with 40 additions and 223 deletions
69
Makefile
69
Makefile
|
@ -1,14 +1,20 @@
|
|||
PREFIX =/usr
|
||||
|
||||
#SDL_BASE = $(PREFIX)/bin/
|
||||
SDL_BASE =
|
||||
ifeq ($(PLATFORM),rpi2)
|
||||
CPU_FLAGS += -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
|
||||
DEFS += -DRASPBERRY
|
||||
HAVE_NEON = 1
|
||||
USE_PICASSO96 = 1
|
||||
else ifeq ($(PLATFORM),rpi1)
|
||||
CPU_FLAGS += -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard
|
||||
DEFS += -DRASPBERRY
|
||||
else ifeq ($(PLATFORM),armv6)
|
||||
CPU_FLAGS += -march=armv6j -mfpu=vfp -mfloat-abi=hard
|
||||
endif
|
||||
|
||||
NAME = uae4arm
|
||||
O = o
|
||||
RM = rm -f
|
||||
CXX = g++-4.8
|
||||
CXX = g++
|
||||
STRIP = strip
|
||||
#AS = as
|
||||
|
||||
PROG = $(NAME)
|
||||
|
||||
|
@ -18,38 +24,37 @@ PANDORA=1
|
|||
|
||||
#USE_XFD=1
|
||||
|
||||
DEFAULT_CFLAGS = `$(SDL_BASE)sdl-config --cflags`
|
||||
LDFLAGS = -lSDL -lpthread -lz -lSDL_image -lpng -lrt
|
||||
SDL_CFLAGS = `sdl-config --cflags`
|
||||
|
||||
MORE_CFLAGS += -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
|
||||
DEFS += -DCPU_arm -DARM_ASSEMBLY -DARMV6_ASSEMBLY -DGP2X -DPANDORA -DDOUBLEBUFFER -DSIX_AXIS_WORKAROUND
|
||||
DEFS += -DROM_PATH_PREFIX=\"./\" -DDATA_PREFIX=\"./data/\" -DSAVE_PREFIX=\"./saves/\"
|
||||
DEFS += -DUSE_SDL -DUSE_UNDERSCORE -DUNALIGNED_PROFITABLE -DOPTIMIZED_FLAGS
|
||||
|
||||
ifeq ($(USE_PICASSO96), 1)
|
||||
DEFS += -DPICASSO96
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NEON), 1)
|
||||
DEFS += -DUSE_ARMNEON
|
||||
endif
|
||||
|
||||
MORE_CFLAGS += -DGP2X -DPANDORA -DDOUBLEBUFFER -DARMV6_ASSEMBLY -DUSE_ARMNEON -DRASPBERRY -DPICASSO96 -DSIX_AXIS_WORKAROUND
|
||||
MORE_CFLAGS += -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads
|
||||
|
||||
MORE_CFLAGS += -DCPU_arm -DARM_ASSEMBLY
|
||||
|
||||
MORE_CFLAGS += -Isrc -Isrc/od-pandora -Isrc/gp2x -Isrc/threaddep -Isrc/menu -Isrc/include -Isrc/gp2x/menu -fomit-frame-pointer -Wno-unused -Wno-format -DUSE_SDL -DGCCCONSTFUNC="__attribute__((const))" -DUSE_UNDERSCORE -DUNALIGNED_PROFITABLE -DOPTIMIZED_FLAGS
|
||||
LDFLAGS += -lSDL_ttf -lguichan_sdl -lguichan -lbcm_host -L/opt/vc/lib
|
||||
MORE_CFLAGS += -Isrc -Isrc/od-pandora -Isrc/gp2x -Isrc/threaddep -Isrc/menu -Isrc/include -Isrc/gp2x/menu -Wno-unused -Wno-format -DGCCCONSTFUNC="__attribute__((const))"
|
||||
MORE_CFLAGS += -fexceptions -fpermissive
|
||||
|
||||
LDFLAGS += -lSDL -lpthread -lm -lz -lSDL_image -lpng -lrt -lSDL_ttf -lguichan_sdl -lguichan -lbcm_host -L/opt/vc/lib
|
||||
|
||||
MORE_CFLAGS += -DROM_PATH_PREFIX=\"./\" -DDATA_PREFIX=\"./data/\" -DSAVE_PREFIX=\"./saves/\"
|
||||
|
||||
MORE_CFLAGS += -mhard-float -ffast-math -mfpu=neon
|
||||
ifndef DEBUG
|
||||
MORE_CFLAGS += -O3
|
||||
MORE_CFLAGS += -fstrict-aliasing
|
||||
MORE_CFLAGS += -fweb -frename-registers -fomit-frame-pointer
|
||||
#MORE_CFLAGS += -falign-functions=32 -falign-loops -falign-labels -falign-jumps
|
||||
MORE_CFLAGS += -finline -finline-functions -fno-builtin
|
||||
#MORE_CFLAGS += -S
|
||||
MORE_CFLAGS += -O3 -fomit-frame-pointer
|
||||
MORE_CFLAGS += -finline -fno-builtin
|
||||
else
|
||||
MORE_CFLAGS += -ggdb
|
||||
endif
|
||||
|
||||
ASFLAGS += -mfloat-abi=hard -mfpu=neon
|
||||
ASFLAGS += $(CPU_FLAGS)
|
||||
|
||||
CFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)
|
||||
CXXFLAGS += $(SDL_CFLAGS) $(CPU_FLAGS) $(DEFS) $(MORE_CFLAGS)
|
||||
|
||||
OBJS = \
|
||||
src/audio.o \
|
||||
|
@ -119,12 +124,10 @@ OBJS = \
|
|||
src/archivers/wrp/warp.o \
|
||||
src/archivers/zip/unzip.o \
|
||||
src/md-pandora/support.o \
|
||||
src/od-pandora/neon_helper.o \
|
||||
src/od-pandora/fsdb_host.o \
|
||||
src/od-pandora/joystick.o \
|
||||
src/od-pandora/keyboard.o \
|
||||
src/od-pandora/inputmode.o \
|
||||
src/od-pandora/picasso96.o \
|
||||
src/od-pandora/writelog.o \
|
||||
src/od-pandora/pandora.o \
|
||||
src/od-pandora/pandora_filesys.o \
|
||||
|
@ -165,6 +168,14 @@ ifdef PANDORA
|
|||
OBJS += src/od-pandora/gui/sdltruetypefont.o
|
||||
endif
|
||||
|
||||
ifeq ($(USE_PICASSO96), 1)
|
||||
OBJS += src/od-pandora/picasso96.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NEON), 1)
|
||||
OBJS += src/od-pandora/neon_helper.o
|
||||
endif
|
||||
|
||||
ifdef USE_XFD
|
||||
OBJS += src/cpu_small.o \
|
||||
src/cpuemu_small.o \
|
||||
|
@ -187,10 +198,10 @@ OBJS += src/compemu_support.o
|
|||
CPPFLAGS = $(CFLAGS)
|
||||
|
||||
src/osdep/neon_helper.o: src/osdep/neon_helper.s
|
||||
$(CXX) -O3 -pipe -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard -Wall -o src/osdep/neon_helper.o -c src/osdep/neon_helper.s
|
||||
$(CXX) $(CPU_FLAGS) -Wall -o src/osdep/neon_helper.o -c src/osdep/neon_helper.s
|
||||
|
||||
$(PROG): $(OBJS)
|
||||
$(CXX) $(CFLAGS) -o $(PROG) $(OBJS) $(LDFLAGS)
|
||||
$(CXX) -o $(PROG) $(OBJS) $(LDFLAGS)
|
||||
ifndef DEBUG
|
||||
$(STRIP) $(PROG)
|
||||
endif
|
||||
|
|
194
Makefile_rpi1
194
Makefile_rpi1
|
@ -1,194 +0,0 @@
|
|||
PREFIX =/usr
|
||||
|
||||
#SDL_BASE = $(PREFIX)/bin/
|
||||
SDL_BASE =
|
||||
|
||||
NAME = uae4arm
|
||||
O = o
|
||||
RM = rm -f
|
||||
CXX = g++-4.8
|
||||
STRIP = strip
|
||||
#AS = as
|
||||
|
||||
PROG = $(NAME)
|
||||
|
||||
all: $(PROG)
|
||||
|
||||
PANDORA=1
|
||||
|
||||
#USE_XFD=1
|
||||
|
||||
DEFAULT_CFLAGS = `$(SDL_BASE)sdl-config --cflags`
|
||||
LDFLAGS = -lSDL -lpthread -lz -lSDL_image -lpng -lrt
|
||||
|
||||
MORE_CFLAGS += -mhard-float -ffast-math -mfpu=vfp -mfloat-abi=hard -march=armv6j
|
||||
|
||||
MORE_CFLAGS += -DGP2X -DPANDORA -DDOUBLEBUFFER -DARMV6_ASSEMBLY -DRASPBERRY -DSIX_AXIS_WORKAROUND
|
||||
MORE_CFLAGS += -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads
|
||||
|
||||
MORE_CFLAGS += -DCPU_arm -DARM_ASSEMBLY
|
||||
|
||||
MORE_CFLAGS += -Isrc -Isrc/od-pandora -Isrc/gp2x -Isrc/threaddep -Isrc/menu -Isrc/include -Isrc/gp2x/menu -fomit-frame-pointer -Wno-unused -Wno-format -DUSE_SDL -DGCCCONSTFUNC="__attribute__((const))" -DUSE_UNDERSCORE -DUNALIGNED_PROFITABLE -DOPTIMIZED_FLAGS
|
||||
LDFLAGS += -lSDL_ttf -lguichan_sdl -lguichan -lbcm_host -L/opt/vc/lib
|
||||
MORE_CFLAGS += -fexceptions -fpermissive
|
||||
|
||||
|
||||
MORE_CFLAGS += -DROM_PATH_PREFIX=\"./\" -DDATA_PREFIX=\"./data/\" -DSAVE_PREFIX=\"./saves/\"
|
||||
|
||||
MORE_CFLAGS += -mhard-float -ffast-math -mfpu=vfp -mfloat-abi=hard -march=armv6j
|
||||
ifndef DEBUG
|
||||
MORE_CFLAGS += -O3
|
||||
MORE_CFLAGS += -fstrict-aliasing
|
||||
MORE_CFLAGS += -fweb -frename-registers -fomit-frame-pointer
|
||||
#MORE_CFLAGS += -falign-functions=32 -falign-loops -falign-labels -falign-jumps
|
||||
MORE_CFLAGS += -finline -finline-functions -fno-builtin
|
||||
#MORE_CFLAGS += -S
|
||||
else
|
||||
MORE_CFLAGS += -ggdb
|
||||
endif
|
||||
|
||||
ASFLAGS += -mfloat-abi=hard -mfpu=vfp
|
||||
|
||||
CFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)
|
||||
|
||||
OBJS = \
|
||||
src/audio.o \
|
||||
src/autoconf.o \
|
||||
src/blitfunc.o \
|
||||
src/blittable.o \
|
||||
src/blitter.o \
|
||||
src/cfgfile.o \
|
||||
src/cia.o \
|
||||
src/crc32.o \
|
||||
src/custom.o \
|
||||
src/disk.o \
|
||||
src/drawing.o \
|
||||
src/ersatz.o \
|
||||
src/expansion.o \
|
||||
src/filesys.o \
|
||||
src/fpp.o \
|
||||
src/fsdb.o \
|
||||
src/fsdb_unix.o \
|
||||
src/fsusage.o \
|
||||
src/gfxutil.o \
|
||||
src/hardfile.o \
|
||||
src/inputdevice.o \
|
||||
src/keybuf.o \
|
||||
src/main.o \
|
||||
src/memory.o \
|
||||
src/missing.o \
|
||||
src/native2amiga.o \
|
||||
src/savestate.o \
|
||||
src/traps.o \
|
||||
src/uaelib.o \
|
||||
src/zfile.o \
|
||||
src/zfile_archive.o \
|
||||
src/archivers/7z/7zAlloc.o \
|
||||
src/archivers/7z/7zBuffer.o \
|
||||
src/archivers/7z/7zCrc.o \
|
||||
src/archivers/7z/7zDecode.o \
|
||||
src/archivers/7z/7zExtract.o \
|
||||
src/archivers/7z/7zHeader.o \
|
||||
src/archivers/7z/7zIn.o \
|
||||
src/archivers/7z/7zItem.o \
|
||||
src/archivers/7z/7zMethodID.o \
|
||||
src/archivers/7z/LzmaDecode.o \
|
||||
src/archivers/dms/crc_csum.o \
|
||||
src/archivers/dms/getbits.o \
|
||||
src/archivers/dms/maketbl.o \
|
||||
src/archivers/dms/pfile.o \
|
||||
src/archivers/dms/tables.o \
|
||||
src/archivers/dms/u_deep.o \
|
||||
src/archivers/dms/u_heavy.o \
|
||||
src/archivers/dms/u_init.o \
|
||||
src/archivers/dms/u_medium.o \
|
||||
src/archivers/dms/u_quick.o \
|
||||
src/archivers/dms/u_rle.o \
|
||||
src/archivers/lha/crcio.o \
|
||||
src/archivers/lha/dhuf.o \
|
||||
src/archivers/lha/header.o \
|
||||
src/archivers/lha/huf.o \
|
||||
src/archivers/lha/larc.o \
|
||||
src/archivers/lha/lhamaketbl.o \
|
||||
src/archivers/lha/lharc.o \
|
||||
src/archivers/lha/shuf.o \
|
||||
src/archivers/lha/slide.o \
|
||||
src/archivers/lha/uae_lha.o \
|
||||
src/archivers/lha/util.o \
|
||||
src/archivers/lzx/unlzx.o \
|
||||
src/archivers/wrp/warp.o \
|
||||
src/archivers/zip/unzip.o \
|
||||
src/md-pandora/support.o \
|
||||
src/od-pandora/fsdb_host.o \
|
||||
src/od-pandora/joystick.o \
|
||||
src/od-pandora/keyboard.o \
|
||||
src/od-pandora/inputmode.o \
|
||||
src/od-pandora/writelog.o \
|
||||
src/od-pandora/pandora.o \
|
||||
src/od-pandora/pandora_filesys.o \
|
||||
src/od-pandora/pandora_gui.o \
|
||||
src/od-rasp/rasp_gfx.o \
|
||||
src/od-pandora/pandora_mem.o \
|
||||
src/od-pandora/sigsegv_handler.o \
|
||||
src/od-pandora/menu/menu_config.o \
|
||||
src/sd-sdl/sound_sdl_new.o \
|
||||
src/od-pandora/gui/UaeRadioButton.o \
|
||||
src/od-pandora/gui/UaeDropDown.o \
|
||||
src/od-pandora/gui/UaeCheckBox.o \
|
||||
src/od-pandora/gui/UaeListBox.o \
|
||||
src/od-pandora/gui/InGameMessage.o \
|
||||
src/od-pandora/gui/SelectorEntry.o \
|
||||
src/od-pandora/gui/ShowMessage.o \
|
||||
src/od-pandora/gui/SelectFolder.o \
|
||||
src/od-pandora/gui/SelectFile.o \
|
||||
src/od-pandora/gui/CreateFilesysHardfile.o \
|
||||
src/od-pandora/gui/EditFilesysVirtual.o \
|
||||
src/od-pandora/gui/EditFilesysHardfile.o \
|
||||
src/od-pandora/gui/PanelPaths.o \
|
||||
src/od-pandora/gui/PanelConfig.o \
|
||||
src/od-pandora/gui/PanelCPU.o \
|
||||
src/od-pandora/gui/PanelChipset.o \
|
||||
src/od-pandora/gui/PanelROM.o \
|
||||
src/od-pandora/gui/PanelRAM.o \
|
||||
src/od-pandora/gui/PanelFloppy.o \
|
||||
src/od-pandora/gui/PanelHD.o \
|
||||
src/od-pandora/gui/PanelDisplay.o \
|
||||
src/od-pandora/gui/PanelSound.o \
|
||||
src/od-pandora/gui/PanelInput.o \
|
||||
src/od-pandora/gui/PanelMisc.o \
|
||||
src/od-pandora/gui/PanelSavestate.o \
|
||||
src/od-pandora/gui/main_window.o \
|
||||
src/od-pandora/gui/Navigation.o
|
||||
ifdef PANDORA
|
||||
OBJS += src/od-pandora/gui/sdltruetypefont.o
|
||||
endif
|
||||
|
||||
ifdef USE_XFD
|
||||
OBJS += src/cpu_small.o \
|
||||
src/cpuemu_small.o \
|
||||
src/cpustbl_small.o \
|
||||
src/archivers/xfd/xfd.o
|
||||
endif
|
||||
|
||||
OBJS += src/newcpu.o
|
||||
OBJS += src/readcpu.o
|
||||
OBJS += src/cpudefs.o
|
||||
OBJS += src/cpustbl.o
|
||||
OBJS += src/cpuemu_0.o
|
||||
OBJS += src/cpuemu_4.o
|
||||
OBJS += src/cpuemu_11.o
|
||||
OBJS += src/compemu.o
|
||||
OBJS += src/compemu_fpp.o
|
||||
OBJS += src/compstbl.o
|
||||
OBJS += src/compemu_support.o
|
||||
|
||||
CPPFLAGS = $(CFLAGS)
|
||||
|
||||
$(PROG): $(OBJS)
|
||||
$(CXX) $(CFLAGS) -o $(PROG) $(OBJS) $(LDFLAGS)
|
||||
ifndef DEBUG
|
||||
$(STRIP) $(PROG)
|
||||
endif
|
||||
|
||||
clean:
|
||||
$(RM) $(PROG) $(OBJS)
|
Loading…
Add table
Add a link
Reference in a new issue