From 273f249ec47f46cc2606d2cc0c4a896fedd3e914 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Mon, 23 Jun 2025 22:25:41 +1000 Subject: [PATCH] Further makefile tidyup --- Makefile | 4 +++- misc/32x/Makefile | 2 +- misc/3ds/Makefile | 2 +- misc/dreamcast/IP.BIN | Bin 32768 -> 32768 bytes misc/dreamcast/Makefile | 2 +- misc/dreamcast/ip.txt | 4 ++-- misc/ds/Makefile | 6 ++--- misc/ds/Makefile.arm7 | 4 ++-- misc/ds/Makefile.arm9 | 4 ++-- misc/macclassic/Makefile_68k | 4 ++-- misc/macclassic/Makefile_ppc | 2 +- misc/os2/Makefile | 43 +++++------------------------------ misc/ps1/Makefile | 2 +- misc/psp/Makefile | 2 +- misc/switch/Makefile | 4 ++-- misc/vita/Makefile | 2 +- readme.md | 2 +- 17 files changed, 30 insertions(+), 59 deletions(-) diff --git a/Makefile b/Makefile index b0035cdad..729294caa 100644 --- a/Makefile +++ b/Makefile @@ -298,7 +298,9 @@ $(BUILD_DIRS): # Main executable (typically just 'ClassiCube' or 'ClassiCube.exe') $(ENAME): $(BUILD_DIRS) $(OBJECTS) $(LINK) $(LDFLAGS) -o $@$(OEXT) $(OBJECTS) $(EXTRA_LIBS) $(LIBS) - + @echo "----------------------------------------------------" + @echo "Successfully compiled executable file: $(ENAME)" + @echo "----------------------------------------------------" # macOS app bundle $(ENAME).app : $(ENAME) diff --git a/misc/32x/Makefile b/misc/32x/Makefile index 5dbf7a69d..464beabd8 100644 --- a/misc/32x/Makefile +++ b/misc/32x/Makefile @@ -32,7 +32,7 @@ RM = rm -f TARGET = ClassiCube-32x LIBS = $(LIBPATH) -lc -lgcc -lgcc-Os-4-200 -lnosys -BUILD_DIR = build-32x +BUILD_DIR = build/32x SOURCE_DIRS = src misc/32x C_FILES = $(foreach dir,$(SOURCE_DIRS),$(wildcard $(dir)/*.c)) diff --git a/misc/3ds/Makefile b/misc/3ds/Makefile index f0b91f031..22ebaa504 100644 --- a/misc/3ds/Makefile +++ b/misc/3ds/Makefile @@ -15,7 +15,7 @@ include $(DEVKITARM)/3ds_rules APP_ICON := $(TOPDIR)/misc/3ds/icon.png APP_TITLE := ClassiCube APP_DESCRIPTION := Simple block building sandbox -APP_AUTHOR := UnknownShadow200 +APP_AUTHOR := ClassiCube team TARGET := ClassiCube-3ds #--------------------------------------------------------------------------------- diff --git a/misc/dreamcast/IP.BIN b/misc/dreamcast/IP.BIN index 4fb6e83c74732d5e94e9c8840da47fc2863210a0..d49f4cafd305fd2ff9d273b61e387ffb8f3b3be4 100644 GIT binary patch delta 318 zcmZo@U}|V!nxK&7VqsvS;OwFs!Z>XT)73!)00|c7+V=y8JmE(v3GK=eGFd*17kY_V+$BH_Dp_iAIjGQ z6KZ8(Z0w#K>JWx5bi^T<4`>ubBSe*hV-&(Hh|osI5Og7Fr#R6jkQ?BZGBq!Z>XT)73!)00Bld0|V!r#Ny&i=hCE9 z1(%}K#N6b>;u4r%AU$zT;wDBVbH<*{$`<$87*|eawhxqSV`yb;24V)rRtCln5ZTJu z1jL^wC)&rz0L5BhsF{JWlYy}v#{D$;w0)>FPz0g?sFH!P3nmZbeVnZ45GDziZ)0HW zMv.jpg -# - icon.jpg -# - /default_icon.jpg -# -# CONFIG_JSON is the filename of the NPDM config file (.json), relative to the project folder. -# If not set, it attempts to use one of the following (in this order): -# - .json -# - config.json -# If a JSON file is provided or autodetected, an ExeFS PFS0 (.nsp) is built instead -# of a homebrew executable (.nro). This is intended to be used for sysmodules. -# NACP building is skipped as well. -#--------------------------------------------------------------------------------- TARGET := ClassiCube -BUILD_DIR := build -SOURCE_DIR:= src -DATA := data +BUILD_DIR := build/os2 +SOURCE_DIR := src + C_SOURCES := $(wildcard $(SOURCE_DIR)/*.c) C_OBJECTS := $(patsubst $(SOURCE_DIR)/%.c, $(BUILD_DIR)/%.o, $(C_SOURCES)) - -OBJECTS := $(C_OBJECTS) $(BUILD_DIR)/$(TARGET).res misc/os2/classicube.def -ENAME = ClassiCube -DEL = rm -f -APP_TITLE := ClassiCube -APP_AUTHOR := UnknownShadow200 +OBJECTS := $(C_OBJECTS) $(BUILD_DIR)/$(TARGET).res misc/os2/classicube.def #--------------------------------------------------------------------------------- # options for code generation @@ -43,7 +12,7 @@ APP_AUTHOR := UnknownShadow200 CC := gcc CFLAGS := -pipe -Wno-attributes -fno-math-errno -O3 -g -mtune=pentium4 -msse2 -march=i686 -idirafter /@unixroot/usr/include/os2tk45 -DOS2 LDFLAGS := -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp -Zlinker DISABLE -Zlinker 1121 -LIBS := -lcx -lmmpm2 -lpthread /@unixroot/usr/local/lib/kai.a +LIBS := -lcx -lmmpm2 -lpthread /@unixroot/usr/local/lib/kai.a $(TARGET).exe: $(BUILD_DIR) $(OBJECTS) $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS) @@ -51,7 +20,7 @@ $(TARGET).exe: $(BUILD_DIR) $(OBJECTS) $(BUILD_DIR): mkdir -p $(BUILD_DIR) -$(C_OBJECTS): $(BUILD_DIR)/%.o : $(SOURCE_DIR)/%.c +$(BUILD_DIR)/%.o : $(SOURCE_DIR)/%.c $(CC) $(CFLAGS) -c $< -o $@ $(BUILD_DIR)/$(TARGET).res: misc/os2/$(TARGET).rc misc/os2/$(TARGET).ico diff --git a/misc/ps1/Makefile b/misc/ps1/Makefile index b57541e8b..6a1c2ba04 100644 --- a/misc/ps1/Makefile +++ b/misc/ps1/Makefile @@ -1,4 +1,4 @@ -BUILD_DIR := build-ps1 +BUILD_DIR := build/ps1 SOURCE_DIRS := src TARGET := ClassiCube-ps1 diff --git a/misc/psp/Makefile b/misc/psp/Makefile index 47aa03925..afad7eae5 100644 --- a/misc/psp/Makefile +++ b/misc/psp/Makefile @@ -2,7 +2,7 @@ TARGET = ClassiCube-psp PSP_EBOOT_TITLE = ClassiCube PSP_EBOOT_ICON = misc/psp/ICON0.png -BUILD_DIR := build-psp +BUILD_DIR := build/psp SOURCE_DIRS := src third_party/bearssl/src C_FILES := $(foreach dir,$(SOURCE_DIRS),$(wildcard $(dir)/*.c)) diff --git a/misc/switch/Makefile b/misc/switch/Makefile index 9d1b3a8c3..9b540fd43 100644 --- a/misc/switch/Makefile +++ b/misc/switch/Makefile @@ -38,14 +38,14 @@ include $(DEVKITPRO)/libnx/switch_rules # NACP building is skipped as well. #--------------------------------------------------------------------------------- TARGET := ClassiCube-switch -BUILD := build-switch +BUILD := build/switch SOURCES := src misc/switch third_party/bearssl/src DATA := data INCLUDES := third_party/bearssl/inc #ROMFS := romfs APP_TITLE := ClassiCube -APP_AUTHOR := UnknownShadow200 +APP_AUTHOR := ClassiCube team ICON := misc/switch/icon.jpg #--------------------------------------------------------------------------------- diff --git a/misc/vita/Makefile b/misc/vita/Makefile index a979c9660..b2d7cb80a 100644 --- a/misc/vita/Makefile +++ b/misc/vita/Makefile @@ -2,7 +2,7 @@ PROJECT_TITLE := ClassiCube PROJECT_TITLEID := CUBE00200 TARGET := ClassiCube-vita -BUILD_DIR := build-vita +BUILD_DIR := build/vita SOURCE_DIRS := src third_party/bearssl/src CFLAGS += -Wl,-q -Ithird_party/bearssl/inc -O1 diff --git a/readme.md b/readme.md index 37a50af41..0193bf78b 100644 --- a/readme.md +++ b/readme.md @@ -340,7 +340,7 @@ Run `make saturn`. You'll need [libyaul](https://github.com/yaul-org/libyaul) 1. Install `libexecinfo`, `curl` and `openal-soft` packages if needed 2. Run either: * `make netbsd` or - * `cc src/*.c -o ClassiCube -I /usr/X11R7/include -I /usr/pkg/include -L /usr/X11R7/lib -L /usr/pkg/lib -lpthread -lX11 -lXi -lGL -lexecinfo` + * `cc src/*.c -o ClassiCube -I /usr/X11R7/include -I /usr/pkg/include -L /usr/X11R7/lib -L /usr/pkg/lib -lpthread -lX11 -lXi -lGL -lexecinfo` #### DragonflyBSD