Skip to content

Commit

Permalink
Makefile: refactor/neutralize
Browse files Browse the repository at this point in the history
  • Loading branch information
Apaczer committed Sep 4, 2024
1 parent 3ad8bfe commit 8913225
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 21 deletions.
32 changes: 20 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ alldir = burn \
generated \
sdl-dingux
#cpu/nec
incdir = $(foreach dir,$(alldir),-I$(srcdir)$(dir)) -I$(objdir)generated -I$(srcdir) -I/opt/miyoo/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/include -I/opt/miyoo/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/include/SDL
incdir = $(foreach dir,$(alldir),-I$(srcdir)$(dir)) -I$(objdir)generated -I$(srcdir)

lib = -lstdc++ -lSDL -lSDL_image -lz
lib = -lstdc++

ifdef USE_LIBAO
lib += -lao
Expand Down Expand Up @@ -254,19 +254,27 @@ alldep = $(foreach file,$(autobj:.o=.c), \

HOSTCC = gcc
HOSTCXX = g++
CC = /opt/miyoo/bin/arm-miyoo-linux-uclibcgnueabi-gcc
CXX = /opt/miyoo/bin/arm-miyoo-linux-uclibcgnueabi-g++
LD = $(CXX)
AS = /opt/miyoo/bin/arm-miyoo-linux-uclibcgnueabi-as

HOSTCFLAGS = $(incdir)
CFLAGS = -O2 -march=armv5te -mtune=arm926ej-s -pipe -fno-builtin -fno-common \
-fomit-frame-pointer -fexpensive-optimizations -Wno-write-strings -DLSB_FIRST
CXXFLAGS = -O2 -march=armv5te -mtune=arm926ej-s -pipe -fno-builtin -fno-common \
-fomit-frame-pointer -fexpensive-optimizations -Wno-write-strings -DLSB_FIRST

CHAINPREFIX ?= /opt/miyoo
CROSS_COMPILE ?= $(CHAINPREFIX)/usr/bin/arm-linux-
CC = $(CROSS_COMPILE)gcc
CXX = $(CROSS_COMPILE)g++
# `ld` fail with gcc platform cflags, use cc instead
LD = $(CC)
AS = $(CROSS_COMPILE)as

PKG_CONFIG ?= $(CHAINPREFIX)/usr/bin/pkg-config
PKGS = sdl SDL_image zlib
PKGS_CFLAGS = $(shell $(PKG_CONFIG) --cflags $(PKGS))
PKGS_LIBS = $(shell $(PKG_CONFIG) --libs $(PKGS))
CFLAGS = -O2 -pipe -fno-builtin -fno-common \
-fomit-frame-pointer -fexpensive-optimizations -Wno-write-strings -DLSB_FIRST
CFLAGS += -D__cdecl="" -D__fastcall=""
CXXFLAGS += -D__cdecl="" -D__fastcall=""
CFLAGS += $(PKGS_CFLAGS)
CXXFLAGS = $(CFLAGS)

lib += $(PKGS_LIBS)

ifdef USE_LIBAO
CFLAGS += -DUSE_LIBAO
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## FBA - Final Burn Alpha SDL for MiyooCFW

### Cross-Compile build (MiyooCFW):
```
make -j$(nproc)
```

### Native build (linux):
```
no instructions yet
```
File renamed without changes.
6 changes: 0 additions & 6 deletions readme_miyoo.txt

This file was deleted.

3 changes: 0 additions & 3 deletions readmeagain.md

This file was deleted.

0 comments on commit 8913225

Please sign in to comment.