generated from RISC-OS-Community/StandardRepoTemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from pzaino/develop
Develop
- Loading branch information
Showing
20 changed files
with
398 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
| Lib DTB for RISC OS | ||
| by Paolo Fabio Zaino 2023 | ||
|
||
IconSprites <Obey$Dir>.!Sprites | ||
If "<LibDTB$Dir>" = "" Then Set LibDTB$Dir <Obey$Dir> | ||
Set LibDTB$Path <LibDTB$Dir>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
| Lib DTB for RISC OS | ||
| by Paolo Fabio Zaino 2023 | ||
|
||
IconSprites <Obey$Dir>.!Sprites | ||
Set LibDTB$Dir <Obey$Dir> | ||
Set LibDTB$Path <LibDTB$Dir>. |
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
| Generic Library builder for DDE on RISC OS | ||
| by Paolo Fabio Zaino | ||
|
||
echo ++++++++++++++++++++++++ | ||
echo ++ Building using DDE ++ | ||
echo ++++++++++++++++++++++++ | ||
|
||
Set Build$Root <Obey$Dir> | ||
|
||
WimpSlot -min 6144K | ||
|
||
echo --------------------- | ||
echo Building the Library: | ||
echo --------------------- | ||
|
||
Dir <Build$Root>.src | ||
amu all THROWBACK=-throwback -f MakeFileDDE | ||
|
||
up | ||
|
||
IfThere @.!LibDTB Then Else CDir @.!LibDTB | ||
IfThere @.!LibDTB.o Then Else CDir @.!LibDTB.o | ||
IfThere @.!LibDTB.a Then Else CDir @.!LibDTB.a | ||
IfThere @.!LibDTB.h Then Else CDir @.!LibDTB.h | ||
|
||
IFthere @.src.dtblib.o.dtblib Then copy @.src.dtblib.o.dtblib @.!LibDTB.o.dtblib ~C N | ||
IFthere @.src.dtblib.o.dtblibzm Then copy @.src.dtblib.o.dtblibzm @.!LibDTB.o.dtblibzm ~C N | ||
IFthere @.src.dtblib.h.dtb Then copy @.src.dtblib.h.dtb @.!LibDTB.h.dtblib ~C N | ||
|
||
echo | ||
echo --------------------- | ||
echo | ||
|
||
echo --------------------- | ||
echo Building Tests: | ||
echo --------------------- | ||
|
||
Dir <Build$Root>.tests | ||
|
||
Set CanRunTests$Flag 0 | ||
IfThere @.^.!LibDTB.o.dtblib Then Set CanRunTests$Flag 1 | ||
If "<CanRunTests$Flag>" = "1" Then IfThere @.MakefileDDE Then Set CanRunTests$Flag 2 | ||
If "<CanRunTests$Flag>" = "2" Then make all THROWBACK=-throwback -f MakeFileDDE | ||
|
||
Unset CanRunTests$Flag | ||
|
||
echo | ||
echo --------------------- | ||
echo | ||
|
||
Dir <Build$Root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Dir <Obey$Dir>.src | ||
WimpSlot -min 2048k | ||
amu clean -f MakeFileDDE | ||
stripdepnd MakeFileDDE | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Dir <Obey$Dir> | ||
WimpSlot -min 2048K | ||
amu export_hdrs LIBDIR=Export -f MakeFileDDE | ||
amu export_libs LIBDIR=Export THROWBACK=-throwback -f MakeFileDDE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
| Generic Library builder for GCC on RISC OS | ||
| by Paolo Fabio Zaino | ||
|
||
echo ++++++++++++++++++++++++ | ||
echo ++ Building using GCC ++ | ||
echo ++++++++++++++++++++++++ | ||
|
||
Set Build$Root <Obey$Dir> | ||
|
||
WimpSlot -min 16384K | ||
|
||
echo --------------------- | ||
echo Building the Library: | ||
echo --------------------- | ||
|
||
Dir <Build$Root>.src | ||
make all THROWBACK=-throwback OS=RISC_OS -f MakeFileGCC | ||
|
||
|IFthere @.o.ezinilib Then copy @.o.libezini @.^.!LibEzINI.a.libezini ~C N | ||
|IFthere @.h.ezini Then copy @.h.ezini @.^.!LibEzINI.h.ezini ~C N | ||
|
||
echo | ||
echo --------------------- | ||
echo | ||
|
||
echo --------------------- | ||
echo Building Tests: | ||
echo --------------------- | ||
|
||
Dir <Build$Root>.tests | ||
make all THROWBACK=-throwback -f MakeFileGCC | ||
|
||
echo | ||
echo --------------------- | ||
echo | ||
|
||
Dir <Build$Root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Dir <Obey$Dir>.src | ||
WimpSlot -min 16384K | ||
make clean -f MakeFileGCC | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Master Makefile | ||
|
||
OBJS=dtblib | ||
|
||
.PHONY: $(OBJS) | ||
$(OBJS): | ||
dir @.$@ | ||
amu all_libs THROWBACK=-throwback -f MakefileDDE | ||
up | ||
|
||
.PHONY: all | ||
all: $(OBJS) | ||
|
||
.PHONY: clean | ||
clean: | ||
# dir @.$< | ||
# @.MkCleanDDE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
# Variables | ||
ifeq ($(OS),) | ||
OS := RISC_OS | ||
endif | ||
|
||
# Set variables based on the detected OS | ||
ifeq ($(OS),Linux) | ||
CD_CMD = cd | ||
RM_CMD = rm -f | ||
DIR_SYM =/ | ||
LOCAL_DIR=. | ||
UP_DIR=.. | ||
EXT_SYM =. | ||
MAKE_FLAGS = -j4 | ||
else ifeq ($(OS),Darwin) # macOS | ||
CD_CMD = cd | ||
RM_CMD = rm -f | ||
DIR_SYM =/ | ||
LOCAL_DIR=. | ||
UP_DIR=.. | ||
EXT_SYM =. | ||
MAKE_FLAGS = -j4 | ||
else ifeq ($(OS),Windows) | ||
CD_CMD = cd | ||
RM_CMD = del | ||
DIR_SYM =/ | ||
LOCAL_DIR=. | ||
UP_DIR=.. | ||
EXT_SYM =. | ||
MAKE_FLAGS = -j4 | ||
else ifeq ($(OS),RISC_OS) | ||
CD_CMD = cdir | ||
RM_CMD = remove | ||
DIR_SYM =. | ||
LOCAL_DIR=@ | ||
UP_DIR=^ | ||
EXT_SYM =/ | ||
MAKE_FLAGS = -mthrowback | ||
else | ||
$(error Unknown operating system: $(UNAME)) | ||
endif | ||
|
||
CC = gcc | ||
MAKE = make | ||
|
||
LIB_DIR = libs | ||
# If needed add more libraries in the following format: | ||
# LIBS = $(LIB_DIR)$(DIR_SYM)lib1 $(LIB_DIR)$(DIR_SYM)lib2 $(LIB_DIR)$(DIR_SYM)lib3 | ||
LIBS = | ||
LIB_NAME = DTBLib | ||
MAIN_DIR = DTBLib | ||
MAIN_LIB = $(LIB_NAME) | ||
ifeq ($(OS),RISC_OS) | ||
MAIN_SRC = c.$(LIB_NAME) | ||
MAIN_OBJ = o.$(LIB_NAME) | ||
else | ||
MAIN_SRC = $(LIB_NAME).c | ||
MAIN_OBJ = $(LIB_NAME).o | ||
endif | ||
|
||
# Setup CFLAGS | ||
CFLAGS = -Wall -Wextra -pedantic | ||
CFLAGS += -ansi -std=c99 -Wno-gnu-label-as-value | ||
# reduce code size: | ||
#CFLAGS += -Os -ffunction-sections -fdata-sections -flto | ||
# compile for maximum speed | ||
CFLAGS += -Ofast -fno-stack-protector -fno-strict-aliasing -fomit-frame-pointer -flto | ||
#LDFLAGS += -Wl,--gc-sections | ||
LDFLAGS += -flto | ||
|
||
# Add -I flags for each library to CFLAGS | ||
CFLAGS += -I$(LIB_DIR) $(foreach dir,$(LIBS),-I$(dir) -I$(dir)$(DIR_SYM)src) | ||
|
||
# Targets | ||
all: $(MAIN_LIB) | ||
|
||
# Building the main application | ||
$(MAIN_LIB): libs | ||
$(MAKE) -C $(LOCAL_DIR)$(DIR_SYM)$(MAIN_DIR) all OS=$(OS) -f MakefileGCC | ||
|
||
# Building the libraries by invoking their own Makefiles | ||
libs: $(LIBS) | ||
|
||
$(LIBS): | ||
$(MAKE) -C $(LOCAL_DIR)$(DIR_SYM)$@$(DIR_SYM)src all OS=$(OS) -f MakefileGCC | ||
|
||
# To initialize and update git submodules | ||
init-submodules: | ||
git submodule init | ||
git submodule update | ||
|
||
# Clean up | ||
clean: | ||
$(RM_CMD) $(MAIN_LIB) | ||
for dir in $(LIBS); do \ | ||
($(CD_CMD) $$dir && $(MAKE) clean OS=$(OS) -f MakefileGCC); \ | ||
done | ||
|
||
# To force rebuild everything | ||
rebuild: clean all | ||
|
||
.PHONY: all clean rebuild init-submodules libs $(LIBS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Makefile for dtblib | ||
|
||
COMPONENT = dtblib | ||
OBJS = krnllib strlib dtb | ||
|
||
include CLibrary | ||
LIBS = | ||
#LDFLAGS = -bin | ||
|
||
# Dynamic dependencies: | ||
|
||
oz.dtb: c.dtb | ||
oz.dtb: h.krnllib | ||
oz.dtb: h.strlib | ||
oz.dtb: h.krnllib | ||
oz.dtb: h.dtb | ||
o.krnllib: c.krnllib | ||
o.krnllib: h.krnllib | ||
o.strlib: c.strlib | ||
o.strlib: h.krnllib | ||
o.strlib: h.strlib | ||
o.strlib: h.krnllib | ||
o.dtb: c.dtb | ||
o.dtb: h.krnllib | ||
o.dtb: h.strlib | ||
o.dtb: h.krnllib | ||
o.dtb: h.dtb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.