diff --git a/make/paths.mk b/make/paths.mk index 379754e..05e1f07 100644 --- a/make/paths.mk +++ b/make/paths.mk @@ -38,7 +38,6 @@ endif LIBDIR := $(PREFIX)/lib BINDIR := $(PREFIX)/bin -SHAREDDIR := $(PREFIX)/share INCDIR := $(PREFIX)/include BUILDDIR := $(BASEDIR)/.build TARGET_BUILDDIR := $(BUILDDIR)/target @@ -65,6 +64,15 @@ ifndef INCDIR INCDIR := $(PREFIX)/include endif +# Shared resources +ifndef SHAREDDIR + ifeq ($(PLATFORM),Haiku) + SHAREDDIR := $(PREFIX)/data + else + SHAREDDIR := $(PREFIX)/share + endif +endif + # Temporary directory ifndef TEMPDIR ifeq ($(PLATFORM),Windows) diff --git a/make/system.mk b/make/system.mk index 7abdf3a..f7ffc14 100644 --- a/make/system.mk +++ b/make/system.mk @@ -38,6 +38,8 @@ ifndef PLATFORM PLATFORM := Linux else ifeq ($(findstring SunOS,$(BUILD_SYSTEM)),SunOS) PLATFORM := Solaris + else ifeq ($(findstring Haiku,$(BUILD_SYSTEM)),Haiku) + PLATFORM := Haiku endif endif diff --git a/make/tools.mk b/make/tools.mk index 91f6d16..92c1690 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -81,6 +81,12 @@ else ifeq ($(PLATFORM),Windows) EXE_FLAGS_EXT += -static-libgcc -static-libstdc++ SO_FLAGS_EXT += -static-libgcc -static-libstdc++ LDFLAGS_EXT += -T $(CURDIR)/make/ld-windows.script +else ifeq ($(PLATFORM),Haiku) + EXE_FLAGS_EXT += -L/system/lib -L/system/develop/lib + SO_FLAGS_EXT += -L/system/lib -L/system/develop/lib + CXXFLAGS_EXT += -D_GNU_SOURCE -D_BSD_SOURCE + CFLAGS_EXT += -D_GNU_SOURCE -D_BSD_SOURCE + LDFLAGS_EXT += -L/system/develop/lib/ else ifeq ($(PLATFORM),BSD) EXE_FLAGS_EXT += -L/usr/local/lib SO_FLAGS_EXT += -L/usr/local/lib