Skip to content

Commit 6f3e4a6

Browse files
committed
Updated build scripts
1 parent e6536a1 commit 6f3e4a6

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

make/paths.mk

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ endif
3838

3939
LIBDIR := $(PREFIX)/lib
4040
BINDIR := $(PREFIX)/bin
41-
SHAREDDIR := $(PREFIX)/share
4241
INCDIR := $(PREFIX)/include
4342
BUILDDIR := $(BASEDIR)/.build
4443
TARGET_BUILDDIR := $(BUILDDIR)/target
@@ -65,6 +64,15 @@ ifndef INCDIR
6564
INCDIR := $(PREFIX)/include
6665
endif
6766

67+
# Shared resources
68+
ifndef SHAREDDIR
69+
ifeq ($(PLATFORM),Haiku)
70+
SHAREDDIR := $(PREFIX)/data
71+
else
72+
SHAREDDIR := $(PREFIX)/share
73+
endif
74+
endif
75+
6876
# Temporary directory
6977
ifndef TEMPDIR
7078
ifeq ($(PLATFORM),Windows)

make/system.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ ifndef PLATFORM
3838
PLATFORM := Linux
3939
else ifeq ($(findstring SunOS,$(BUILD_SYSTEM)),SunOS)
4040
PLATFORM := Solaris
41+
else ifeq ($(findstring Haiku,$(BUILD_SYSTEM)),Haiku)
42+
PLATFORM := Haiku
4143
endif
4244
endif
4345

make/tools.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ else ifeq ($(PLATFORM),Windows)
8181
EXE_FLAGS_EXT += -static-libgcc -static-libstdc++
8282
SO_FLAGS_EXT += -static-libgcc -static-libstdc++
8383
LDFLAGS_EXT += -T $(CURDIR)/make/ld-windows.script
84+
else ifeq ($(PLATFORM),Haiku)
85+
EXE_FLAGS_EXT += -L/system/lib -L/system/develop/lib
86+
SO_FLAGS_EXT += -L/system/lib -L/system/develop/lib
87+
CXXFLAGS_EXT += -D_GNU_SOURCE -D_BSD_SOURCE
88+
CFLAGS_EXT += -D_GNU_SOURCE -D_BSD_SOURCE
89+
LDFLAGS_EXT += -L/system/develop/lib/
8490
else ifeq ($(PLATFORM),BSD)
8591
EXE_FLAGS_EXT += -L/usr/local/lib
8692
SO_FLAGS_EXT += -L/usr/local/lib

0 commit comments

Comments
 (0)