Skip to content

Commit

Permalink
change GMenuNX occurrences back to GMenu2X
Browse files Browse the repository at this point in the history
+mv Makefile.linux to Makefile
  • Loading branch information
Apaczer committed Dec 18, 2023
1 parent 2de4f62 commit ccfa8a6
Show file tree
Hide file tree
Showing 18 changed files with 162 additions and 162 deletions.
57 changes: 19 additions & 38 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,46 +1,41 @@
PLATFORM := retrofw
PLATFORM := linux

BUILDTIME := $(shell date +%s)

CHAINPREFIX := /opt/mipsel-RetroFW-linux-uclibc
CROSS_COMPILE := $(CHAINPREFIX)/usr/bin/mipsel-linux-
export CROSS_COMPILE

CC := $(CROSS_COMPILE)gcc
CXX := $(CROSS_COMPILE)g++
STRIP := $(CROSS_COMPILE)strip
CC := gcc
CXX := g++
STRIP := strip

SYSROOT := $(shell $(CC) --print-sysroot)
SDL_CFLAGS := $(shell $(SYSROOT)/usr/bin/sdl-config --cflags)
SDL_LIBS := $(shell $(SYSROOT)/usr/bin/sdl-config --libs)

CFLAGS = -DPLATFORM=\"$(PLATFORM)\" -D__BUILDTIME__="$(BUILDTIME)" -DLOG_LEVEL=3
CFLAGS += -Os -ggdb -g3 $(SDL_CFLAGS)
CFLAGS += -mhard-float -mips32 -mno-mips16
CFLAGS += -std=c++11 -fdata-sections -ffunction-sections -fno-exceptions -fno-math-errno -fno-threadsafe-statics -Wno-narrowing
CFLAGS = -DPLATFORM=\"$(PLATFORM)\" -D__BUILDTIME__="$(BUILDTIME)" -DLOG_LEVEL=4
CFLAGS += -O0 -ggdb -g -pg $(SDL_CFLAGS)
CFLAGS += -Wundef -Wno-deprecated -Wno-unknown-pragmas -Wno-format -Wno-narrowing
CFLAGS += -Isrc -Isrc/libopk
CFLAGS += -DTARGET_RETROFW -DHW_TVOUT -DHW_UDC -DHW_EXT_SD -DHW_SCALER -DOPK_SUPPORT -DIPK_SUPPORT
CFLAGS += -D_GLIBCXX_USE_CXX11_ABI=0
CFLAGS += -DTARGET_LINUX -DHW_TVOUT -DHW_UDC -DHW_EXT_SD -DHW_SCALER -DOPK_SUPPORT -DIPK_SUPPORT

LDFLAGS = -Wl,-Bstatic -Lsrc/libopk -l:libopk.a
LDFLAGS += -Wl,-Bdynamic -lz $(SDL_LIBS) -lSDL_image -lSDL_ttf
LDFLAGS += -Wl,--as-needed -Wl,--gc-sections

OBJDIR = /tmp/gmenu2x/$(PLATFORM)
DISTDIR = dist/$(PLATFORM)
TARGET = $(DISTDIR)/gmenu2x
TARGET = dist/$(PLATFORM)/gmenu2x

SOURCES := $(wildcard src/*.cpp)
OBJS := $(patsubst src/%.cpp, $(OBJDIR)/%.o, $(SOURCES))
OBJS := $(patsubst src/%.cpp, $(OBJDIR)/src/%.o, $(SOURCES))

# File types rules
$(OBJDIR)/%.o: src/%.cpp src/%.h src/platform/$(PLATFORM).h
$(OBJDIR)/src/%.o: src/%.cpp src/%.h src/platform/linux.h
$(CXX) $(CFLAGS) -o $@ -c $<

-include $(patsubst src/%.cpp, $(OBJDIR)/src/%.d, $(SOURCES))

all: dir libopk shared

dir:
@mkdir -p $(OBJDIR) $(DISTDIR)
@mkdir -p $(OBJDIR)/src dist/$(PLATFORM)

libopk:
make -C src/libopk clean
Expand All @@ -55,29 +50,15 @@ shared: debug

clean:
make -C src/libopk clean
rm -rf $(OBJDIR) *.gcda *.gcno $(TARGET) $(TARGET)-debug /tmp/.gmenu-ipk/ $(DISTDIR) dist/gmenunx-$(PLATFORM).zip dist/gmenunx-$(PLATFORM).ipk

ipk: dist
rm -rf /tmp/.gmenu-ipk/; mkdir -p /tmp/.gmenu-ipk/
sed "s/^Version:.*/Version: $$(date +%Y%m%d)/" assets/control > /tmp/.gmenu-ipk/control
cp assets/conffiles /tmp/.gmenu-ipk/
echo -e "#!/bin/sh\nsync; echo -e 'Installing gmenunx..'; mount -o remount,rw /; rm /var/lib/opkg/info/gmenunx.list; exit 0" > /tmp/.gmenu-ipk/preinst
echo -e "#!/bin/sh\nsync; mount -o remount,ro /; echo -e 'Installation finished.\nRestarting gmenunx..'; sleep 1; killall gmenu2x; exit 0" > /tmp/.gmenu-ipk/postinst
chmod +x /tmp/.gmenu-ipk/postinst /tmp/.gmenu-ipk/preinst
tar --owner=0 --group=0 -czvf /tmp/.gmenu-ipk/control.tar.gz -C /tmp/.gmenu-ipk/ control conffiles postinst preinst
tar --owner=0 --group=0 -czvf /tmp/.gmenu-ipk/data.tar.gz -C $(DISTDIR) about.txt COPYING gmenu2x gmenu2x.conf input.conf skins translations
echo 2.0 > /tmp/.gmenu-ipk/debian-binary
ar r dist/gmenunx-$(PLATFORM).ipk /tmp/.gmenu-ipk/control.tar.gz /tmp/.gmenu-ipk/data.tar.gz /tmp/.gmenu-ipk/debian-binary
rm -rf $(OBJDIR) $(DISTDIR) *.gcda *.gcno $(TARGET) $(TARGET)-debug

dist: dir libopk shared
mkdir -p $(DISTDIR)/skins/Default
install -m644 -D about.txt $(DISTDIR)/about.txt
install -m644 -D README.md $(DISTDIR)/README.txt
install -m644 -D COPYING $(DISTDIR)/COPYING
install -m644 -D ChangeLog.md $(DISTDIR)/ChangeLog
cp -RH assets/translations $(DISTDIR)
cp -RH assets/skins/RetroFW/* $(DISTDIR)/skins/Default
cp -RH assets/skins/Default/font.ttf $(DISTDIR)/skins/Default
cp -RH assets/skins $(DISTDIR)
cp -RH assets/$(PLATFORM)/input.conf $(DISTDIR)
echo "wallpaper=\"skins/Default/wallpapers/RetroFW.png\"" > $(DISTDIR)/gmenu2x.conf

zip: dist
cd $(DISTDIR)/ && rm -f ../gmenunx-$(PLATFORM).zip && zip -r ../gmenunx-$(PLATFORM).zip skins translations COPYING gmenu2x input.conf gmenu2x.conf about.txt
cd $(DISTDIR)/ && zip -r ../gmenu2x.$(PLATFORM).zip skins translations ChangeLog COPYING gmenu2x input.conf README.txt
64 changes: 0 additions & 64 deletions Makefile.linux

This file was deleted.

83 changes: 83 additions & 0 deletions Makefile.retrofw
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
PLATFORM := retrofw

BUILDTIME := $(shell date +%s)

CHAINPREFIX := /opt/mipsel-RetroFW-linux-uclibc
CROSS_COMPILE := $(CHAINPREFIX)/usr/bin/mipsel-linux-
export CROSS_COMPILE

CC := $(CROSS_COMPILE)gcc
CXX := $(CROSS_COMPILE)g++
STRIP := $(CROSS_COMPILE)strip

SYSROOT := $(shell $(CC) --print-sysroot)
SDL_CFLAGS := $(shell $(SYSROOT)/usr/bin/sdl-config --cflags)
SDL_LIBS := $(shell $(SYSROOT)/usr/bin/sdl-config --libs)

CFLAGS = -DPLATFORM=\"$(PLATFORM)\" -D__BUILDTIME__="$(BUILDTIME)" -DLOG_LEVEL=3
CFLAGS += -Os -ggdb -g3 $(SDL_CFLAGS)
CFLAGS += -mhard-float -mips32 -mno-mips16
CFLAGS += -std=c++11 -fdata-sections -ffunction-sections -fno-exceptions -fno-math-errno -fno-threadsafe-statics -Wno-narrowing
CFLAGS += -Isrc -Isrc/libopk
CFLAGS += -DTARGET_RETROFW -DHW_TVOUT -DHW_UDC -DHW_EXT_SD -DHW_SCALER -DOPK_SUPPORT -DIPK_SUPPORT
CFLAGS += -D_GLIBCXX_USE_CXX11_ABI=0

LDFLAGS = -Wl,-Bstatic -Lsrc/libopk -l:libopk.a
LDFLAGS += -Wl,-Bdynamic -lz $(SDL_LIBS) -lSDL_image -lSDL_ttf
LDFLAGS += -Wl,--as-needed -Wl,--gc-sections

OBJDIR = /tmp/gmenu2x/$(PLATFORM)
DISTDIR = dist/$(PLATFORM)
TARGET = $(DISTDIR)/gmenu2x

SOURCES := $(wildcard src/*.cpp)
OBJS := $(patsubst src/%.cpp, $(OBJDIR)/%.o, $(SOURCES))

# File types rules
$(OBJDIR)/%.o: src/%.cpp src/%.h src/platform/$(PLATFORM).h
$(CXX) $(CFLAGS) -o $@ -c $<

all: dir libopk shared

dir:
@mkdir -p $(OBJDIR) $(DISTDIR)

libopk:
make -C src/libopk clean
make -C src/libopk

debug: $(OBJS)
@echo "Linking gmenu2x-debug..."
$(CXX) -o $(TARGET)-debug $(OBJS) $(LDFLAGS)

shared: debug
$(STRIP) $(TARGET)-debug -o $(TARGET)

clean:
make -C src/libopk clean
rm -rf $(OBJDIR) *.gcda *.gcno $(TARGET) $(TARGET)-debug /tmp/.gmenu-ipk/ $(DISTDIR) dist/gmenu2x-$(PLATFORM).zip dist/gmenu2x-$(PLATFORM).ipk

ipk: dist
rm -rf /tmp/.gmenu-ipk/; mkdir -p /tmp/.gmenu-ipk/
sed "s/^Version:.*/Version: $$(date +%Y%m%d)/" assets/control > /tmp/.gmenu-ipk/control
cp assets/conffiles /tmp/.gmenu-ipk/
echo -e "#!/bin/sh\nsync; echo -e 'Installing gmenu2x..'; mount -o remount,rw /; rm /var/lib/opkg/info/gmenu2x.list; exit 0" > /tmp/.gmenu-ipk/preinst
echo -e "#!/bin/sh\nsync; mount -o remount,ro /; echo -e 'Installation finished.\nRestarting gmenu2x..'; sleep 1; killall gmenu2x; exit 0" > /tmp/.gmenu-ipk/postinst
chmod +x /tmp/.gmenu-ipk/postinst /tmp/.gmenu-ipk/preinst
tar --owner=0 --group=0 -czvf /tmp/.gmenu-ipk/control.tar.gz -C /tmp/.gmenu-ipk/ control conffiles postinst preinst
tar --owner=0 --group=0 -czvf /tmp/.gmenu-ipk/data.tar.gz -C $(DISTDIR) about.txt COPYING gmenu2x gmenu2x.conf input.conf skins translations
echo 2.0 > /tmp/.gmenu-ipk/debian-binary
ar r dist/gmenu2x-$(PLATFORM).ipk /tmp/.gmenu-ipk/control.tar.gz /tmp/.gmenu-ipk/data.tar.gz /tmp/.gmenu-ipk/debian-binary

dist: dir libopk shared
mkdir -p $(DISTDIR)/skins/Default
install -m644 -D about.txt $(DISTDIR)/about.txt
install -m644 -D COPYING $(DISTDIR)/COPYING
cp -RH assets/translations $(DISTDIR)
cp -RH assets/skins/RetroFW/* $(DISTDIR)/skins/Default
cp -RH assets/skins/Default/font.ttf $(DISTDIR)/skins/Default
cp -RH assets/$(PLATFORM)/input.conf $(DISTDIR)
echo "wallpaper=\"skins/Default/wallpapers/RetroFW.png\"" > $(DISTDIR)/gmenu2x.conf

zip: dist
cd $(DISTDIR)/ && rm -f ../gmenu2x-$(PLATFORM).zip && zip -r ../gmenu2x-$(PLATFORM).zip skins translations COPYING gmenu2x input.conf gmenu2x.conf about.txt
4 changes: 2 additions & 2 deletions Makefile.rg350
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ shared: debug

clean:
make -C src/libopk clean
rm -rf $(OBJDIR) *.gcda *.gcno $(TARGET) $(TARGET)-debug $(DISTDIR) dist/gmenunx-$(PLATFORM).zip
rm -rf $(OBJDIR) *.gcda *.gcno $(TARGET) $(TARGET)-debug $(DISTDIR) dist/gmenu2x-$(PLATFORM).zip

dist: dir libopk shared
mkdir -p $(DISTDIR)/skins/Default
Expand All @@ -67,4 +67,4 @@ dist: dir libopk shared
cp -RH assets/$(PLATFORM)/input.conf $(DISTDIR)

zip: dist
cd $(DISTDIR)/ && rm -f ../gmenunx-$(PLATFORM).zip && zip -r ../gmenunx-$(PLATFORM).zip skins translations COPYING gmenu2x input.conf about.txt
cd $(DISTDIR)/ && rm -f ../gmenu2x-$(PLATFORM).zip && zip -r ../gmenu2x-$(PLATFORM).zip skins translations COPYING gmenu2x input.conf about.txt
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ sudo apt-get install -y build-essential libsdl-dev libsdl-image1.2-dev libsdl-mi
```
Compile with:
```sh
make -f Makefile.linux dist
make dist
```
Then run it from the `dist/linux/` directory:
```sh
Expand Down
12 changes: 6 additions & 6 deletions assets/translations/Chinese(CN)
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Allow the selector to change directory=允许选择程序浏览器改变目录
Alt Font Outline=备选字轮廓色彩
Alt Font=备选文字
Appearance & skin settings=外观设置
apps and GMenuNX. Are you sure?=程序和GMenuNX,是否确定?
apps and GMenu2X. Are you sure?=程序和GMenu2X,是否确定?
apps=软件
Are you sure?=是否确定?
Audio volume=全局音量
Expand Down Expand Up @@ -83,7 +83,7 @@ Font Outline=文字轮廓
Font size=字体大小
Font=文字色彩
games=游戏
GMenuNX=系统
GMenu2X=系统
Go to=跳转
Height of bottom bar=设置底部栏的高度值
Hint: Hold 'SELECT' to disable TV-output=提示:长按SELECT停止电视输出
Expand All @@ -99,7 +99,7 @@ How to show image preview and game art=设置预览图显示方式
Icon=图标
Icons=图标
Image viewer=
Info about GMenuNX=关于GMenuNX
Info about GMenu2X=关于GMenu2X
Insert a name for the new section=为新分组输入名称
Insert a new name for this section=为此分组输入新名称
Installing skin=
Expand Down Expand Up @@ -154,7 +154,7 @@ Remember the last selected section, link and file=记住最后选择的分组,
Remove this dialog!=
Rename section=重命名分组
Reset Default skin settings back to default=恢复默认主题为默认设置
Reset GMenuNX settings=恢复系统默认设置
Reset GMenu2X settings=恢复系统默认设置
Reset link's custom CPU speed back to default=将模拟器自定义的CPU频率恢复为默认值
Reset link's icon back to default=恢复图标为默认设置
Reset settings=恢复默认设置
Expand Down Expand Up @@ -190,9 +190,9 @@ Set the default A/B/X/Y layout=设置默认A/B/X/Y布局
Set the default audio volume=设置系统音量
Set the default tearing FIX method=设置默认屏幕撕裂修正方式
Set the default working CPU frequency=设置默认工作CPU频率
Set the language used by GMenuNX=设置语言
Set the language used by GMenu2X=设置语言
Set the layout and position of the Section Bar=设置标题栏在首页的位置和布局
Set the skin used by GMenuNX=设置皮肤
Set the skin used by GMenu2X=设置皮肤
settings=设置
Settings=设置
Shift=切换
Expand Down
12 changes: 6 additions & 6 deletions assets/translations/Chinese(TW)
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Allow the selector to change directory=允許選擇程式瀏覽器改變目錄
Alt Font Outline=備選字輪廓色彩
Alt Font=備選文字
Appearance & skin settings=
apps and GMenuNX. Are you sure?=
apps and GMenu2X. Are you sure?=
apps=
Are you sure?=是否確定?
Audio volume=全局音量
Expand Down Expand Up @@ -83,7 +83,7 @@ Font Outline=文字輪廓色彩
Font size=文字大小
Font=文字顏色
games=遊戲
GMenuNX=系統
GMenu2X=系統
Go to=
Height of bottom bar=設置底部欄的高度值
Hint: Hold 'SELECT' to disable TV-output=
Expand All @@ -99,7 +99,7 @@ How to show image preview and game art=
Icon=圖標
Icons=圖標
Image viewer=
Info about GMenuNX=
Info about GMenu2X=
Insert a name for the new section=為新分組輸入名稱
Insert a new name for this section=為此分組輸入新名稱
Installing skin=
Expand Down Expand Up @@ -154,7 +154,7 @@ Remember the last selected section, link and file=記住最後選擇的分組,
Remove this dialog!=
Rename section=重命名分組
Reset Default skin settings back to default=恢復默認主題為默認設置
Reset GMenuNX settings=恢復系統默認設置
Reset GMenu2X settings=恢復系統默認設置
Reset link's custom CPU speed back to default=將模擬器自定義的CPU頻率恢復為默認值
Reset link's icon back to default=恢復圖標為默認設置
Reset settings=恢復默認設置
Expand Down Expand Up @@ -190,9 +190,9 @@ Set the default A/B/X/Y layout=
Set the default audio volume=設置系統音量
Set the default tearing FIX method=
Set the default working CPU frequency=設置默認工作CPU頻率
Set the language used by GMenuNX=
Set the language used by GMenu2X=
Set the layout and position of the Section Bar=設置標題欄在首頁的位置和布局
Set the skin used by GMenuNX=
Set the skin used by GMenu2X=
settings=
Settings=設置
Shift=
Expand Down
Loading

0 comments on commit ccfa8a6

Please sign in to comment.