summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Schleifer <js@heap.zone>2018-08-26 19:40:52 +0200
committerJonathan Schleifer <js@heap.zone>2018-08-26 19:40:52 +0200
commit5a760819c3a6fb72d0b2ca497fed203f1d34cb61 (patch)
tree3d7d2d620d1bddf82ea9845e73eb0f154cb47755
parenta93348477f36cfdd91caff0e1ad78f90ab926e66 (diff)
configure: Clean up flags for objfw-config
-rw-r--r--configure.ac17
-rw-r--r--extra.mk.in1
-rw-r--r--src/objfw-defs.h.in2
-rw-r--r--src/platform.h2
-rw-r--r--utils/objfw-config.in5
5 files changed, 13 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index a9c867d7..7b445c74 100644
--- a/configure.ac
+++ b/configure.ac
@@ -91,8 +91,6 @@ case "$host" in
LDFLAGS="$LDFLAGS -Wl,--allow-multiple-definition"
LIBS="$LIBS -lversion"
- AC_SUBST(ALLOW_MULTIPLE_DEFINITION,
- [-Wl,--allow-multiple-definition])
AC_SUBST(USE_SRCS_WINDOWS, '${SRCS_WINDOWS}')
;;
*-psp-*)
@@ -145,6 +143,9 @@ AS_IF([test x"$with_wii" = x"yes"], [
enable_shared="no"
enable_threads="no" # TODO
+ AC_DEFINE(OF_WII, 1, [Whether we are compiling for Wii])
+ AC_SUBST(DEFINES, "-DGEKKO")
+ AC_SUBST(INCLUDES, '-I$DEVKITPRO/libogc/include')
AC_SUBST(MAP_LDFLAGS, ['-Wl,-Map,$@.map'])
])
@@ -166,8 +167,9 @@ AS_IF([test x"$with_nds" = x"yes"], [
enable_sockets="no" # TODO
check_pedantic="no"
- AC_DEFINE(OF_NINTENDO_DS, 1,
- [Whether we are compiling for the Nintendo DS])
+ AC_DEFINE(OF_NINTENDO_DS, 1, [Whether we are compiling for Nintendo DS])
+ AC_SUBST(DEFINES, "-DARM9")
+ AC_SUBST(INCLUDES, '-I$DEVKITPRO/libnds/include')
AC_SUBST(MAP_LDFLAGS, ['-Wl,-Map,$@.map'])
])
@@ -190,7 +192,9 @@ AS_IF([test x"$with_3ds" = x"yes"], [
check_pedantic="no"
AC_DEFINE(OF_NINTENDO_3DS, 1,
- [Whether we are compiling for the Nintendo 3DS])
+ [Whether we are compiling for Nintendo 3DS])
+ AC_SUBST(DEFINES, "-DARM11")
+ AC_SUBST(INCLUDES, '-I$DEVKITPRO/libctru/include')
AC_SUBST(MAP_LDFLAGS, ['-Wl,-Map,$@.map'])
])
@@ -593,8 +597,6 @@ case "$host_os" in
AC_SUBST(REEXPORT_RUNTIME, ["-Wl,-reexport-lobjc"])
AC_SUBST(REEXPORT_RUNTIME_FRAMEWORK,
["-Wl,-reexport-lobjc"])
- AC_SUBST(WEAK_NSFOUNDATIONVERSIONNUMBER,
- ["-Wl,-U,_NSFoundationVersionNumber"])
LDFLAGS="$LDFLAGS -Wl,-U,_NSFoundationVersionNumber"
])
@@ -1772,7 +1774,6 @@ AS_IF([test x"$cross_compiling" = x"yes"], [
AC_CHECK_PROG(wiiload, wiiload, wiiload)
AS_IF([test x"$wiiload" != x""], [
- AC_SUBST(RUN_TESTS, "run")
AC_SUBST(WRAPPER, "$wiiload")
])
])
diff --git a/extra.mk.in b/extra.mk.in
index db232f62..4a42512f 100644
--- a/extra.mk.in
+++ b/extra.mk.in
@@ -84,5 +84,4 @@ USE_SRCS_PLUGINS = @USE_SRCS_PLUGINS@
USE_SRCS_SOCKETS = @USE_SRCS_SOCKETS@
USE_SRCS_THREADS = @USE_SRCS_THREADS@
USE_SRCS_WINDOWS = @USE_SRCS_WINDOWS@
-WEAK_NSFOUNDATIONVERSIONNUMBER = @WEAK_NSFOUNDATIONVERSIONNUMBER@
WRAPPER = @WRAPPER@
diff --git a/src/objfw-defs.h.in b/src/objfw-defs.h.in
index aaf2f8be..b3de2942 100644
--- a/src/objfw-defs.h.in
+++ b/src/objfw-defs.h.in
@@ -40,9 +40,11 @@
#undef OF_HAVE_UNICODE_TABLES
#undef OF_HAVE__THREAD_LOCAL
#undef OF_HAVE___THREAD
+#undef OF_NINTENDO_3DS
#undef OF_NINTENDO_DS
#undef OF_OBJFW_RUNTIME
#undef OF_UNIVERSAL
+#undef OF_WII
#undef SIZE_MAX
#undef UINTPTR_MAX
#undef ULLONG_MAX
diff --git a/src/platform.h b/src/platform.h
index 2699a71e..fd8c7035 100644
--- a/src/platform.h
+++ b/src/platform.h
@@ -138,8 +138,6 @@
# define OF_SOLARIS
#elif defined(__QNX__)
# define OF_QNX
-#elif defined(__wii__)
-# define OF_WII
#elif defined(_PSP)
# define OF_PSP
#elif defined(__DJGPP__)
diff --git a/utils/objfw-config.in b/utils/objfw-config.in
index 086883eb..b634cc3e 100644
--- a/utils/objfw-config.in
+++ b/utils/objfw-config.in
@@ -19,7 +19,7 @@ prefix="@prefix@"
exec_prefix="@exec_prefix@"
libdir="@libdir@"
CFLAGS=""
-CPPFLAGS="-I@includedir@"
+CPPFLAGS="@DEFINES@ @INCLUDES@ -I@includedir@"
CXXFLAGS=""
OBJC="@OBJC@"
OBJCFLAGS="@NOIXEMUL@ @INTEGRATED_AS@ @RUNTIME_FLAGS@"
@@ -30,8 +30,7 @@ LIB_CFLAGS="@LIB_CFLAGS@"
LIB_LDFLAGS="@LIB_LDFLAGS@"
LIB_PREFIX="@LIB_PREFIX@"
LIB_SUFFIX="@LIB_SUFFIX@"
-LDFLAGS="@NOIXEMUL@ -fexceptions @ALLOW_MULTIPLE_DEFINITION@"
-LDFLAGS="$LDFLAGS @WEAK_NSFOUNDATIONVERSIONNUMBER@"
+LDFLAGS="@LDFLAGS@"
LDFLAGS_REEXPORT="@LDFLAGS_REEXPORT@"
LDFLAGS_RPATH="@LDFLAGS_RPATH@"
LIBS="-L${libdir} -lobjfw @RUNTIME_LIBS@ @LIBS@"