jakcron / nstool

General purpose read/extract tool for Nintendo Switch file formats.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove ARFLAGS "-o" to compile on FreeBSD (and possibly others)

swagtoy opened this issue · comments

Not opening PR's for each clone repo, sorry. Each makefile either needs a separate one for Linux (not GNU) and *BSD or just none.

Manually fixing this is easy enough but still a thing to do

I don't mind supporting another platform/arch. But the pattern with this software is to have one makefile. Let me know how to identify when the makefile is being run under FreeBSD. It would be some kind of check I could add here:

# Detect Platform
ifeq ($(PROJECT_PLATFORM),)
	ifeq ($(OS), Windows_NT)
		export PROJECT_PLATFORM = WIN32
	else
		UNAME = $(shell uname -s)
		ifeq ($(UNAME), Darwin)
			export PROJECT_PLATFORM = MACOS
		else
			export PROJECT_PLATFORM = GNU
		endif
	endif
endif

# Detect Architecture
ifeq ($(PROJECT_PLATFORM_ARCH),)
	ifeq ($(PROJECT_PLATFORM), WIN32)
		export PROJECT_PLATFORM_ARCH = x86_64
	else ifeq ($(PROJECT_PLATFORM), GNU)
		export PROJECT_PLATFORM_ARCH = $(shell uname -m)
	else ifeq ($(PROJECT_PLATFORM), MACOS)
		export PROJECT_PLATFORM_ARCH = $(shell uname -m)
	else
		export PROJECT_PLATFORM_ARCH = x86_64
	endif
endif

I don't mind supporting another platform/arch. But the pattern with this software is to have one makefile. Let me know how to identify when the makefile is being run under FreeBSD.

When I looked at each submodule, they all used the same Makefile with the same flags set.

Specifically, is the -o flag for linking or whatever on Linux (GNU, but.. this is sorta wrong) even required for any reason that you know? Never met a piece of software that complains about it

Regardless I got it compiled, I was just shooting a suggestion to each Makefile. Do you need a diff?

Specifically, is the -o flag for linking or whatever on Linux (GNU, but.. this is sorta wrong) even required for any reason that you know? Never met a piece of software that complains about it

It's used when compiling for Ubuntu. But I tried it just now manually without -o so it's probably not required.

It's used when compiling for Ubuntu. But I tried it just now manually without -o so it's probably not required.

Doesn't really make much sense to me. You shouldn't need it.

I guess if you'd like you should just remove it for maximum compatibility. This project should theoretically compile on nearly everything.

commented

I've updated the makefile template to v9 which excludes the -o flag. I'll comment back here when this has propagated to all the dependencies, and a new NSTool version is released.

commented

Released in NSTool v1.8.1