Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use submodules #57

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "sgdk/SGDK"]
path = sgdk/SGDK
url = https://github.com/Stephane-D/SGDK.git
11 changes: 3 additions & 8 deletions sgdk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ SGDKDIR=$(CURDIR)/SGDK
SAMPLESDIR=$(SGDKDIR)/sample

SGDKVER=v1.51
SGDKINSTALLDIR=$(GENDEV)/sgdk$(SGDKVER)

all: tools $(SGDKDIR) $(SGDKDIR)/libmd.a

Expand All @@ -24,21 +23,17 @@ patch: $(SGDKDIR)
prep: $(SGDKDIR)
cd $(SGDKDIR) && patch -u -p1 -l < ../files/sgdk_$(SGDKVER).diff

.PHONY: $(SGDKDIR)
SGDK: $(SGDKDIR)
$(SGDKDIR):
git clone -b '$(SGDKVER)' --single-branch --depth 1 https://github.com/Stephane-D/SGDK.git
git submodule update --init
Copy link
Owner

@kubilus1 kubilus1 Mar 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll want this to represent the SGDK version we want on line 7. (We may not always want the very latest, and also that SGDKVER is used to patch our local SGDK dir for specific tweaks need to run on *nix)

Maybe git submodule add -b tags/$(SGDKVER) ...... before the module update is what we need. (instead of the .gitmodules file)


$(SGDKDIR)/libmd.a: prep
cp -rf ../tools/files/applib/lib $(SGDKDIR)/tools/appack
cd $(SGDKDIR) && ln -sf ../files/Makefile.sgdk_lib .
cd $(SGDKDIR) && $(MAKE) -f Makefile.sgdk_lib

$(SGDKINSTALLDIR):
mkdir -p $@
rm -f $(GENDEV)/sgdk
cd $(GENDEV) && ln -sf sgdk$(SGDKVER) sgdk

install: tools $(SGDKDIR)/libmd.a $(SGDKINSTALLDIR)
install: tools $(SGDKDIR)/libmd.a $(SGDKDIR)
echo "Install"
mkdir -p $(GENDEV)/sgdk/src
mkdir -p $(GENDEV)/sgdk/inc
Expand Down
1 change: 1 addition & 0 deletions sgdk/SGDK
Submodule SGDK added at a87c3f