mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
Add more rules for building libraries.
Add rules for building apps. Some restructuring of the makefile package itself. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@2428 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
adda7ec66c
commit
a25ff6b019
12 changed files with 682 additions and 89 deletions
14
Makefile.in
14
Makefile.in
|
@ -29,14 +29,23 @@
|
|||
srcdir = @srcdir@
|
||||
prefix = @prefix@
|
||||
|
||||
GNUSTEP_TARGET_CPU = @target_cpu@
|
||||
GNUSTEP_TARGET_OS = @target_os@
|
||||
|
||||
include clean.make
|
||||
|
||||
makedir = $(prefix)/Makefiles
|
||||
GNUSTEP_TARGET_DIR = $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)
|
||||
|
||||
all:
|
||||
@echo Nothing needs to be made, just install with
|
||||
@echo make install
|
||||
|
||||
install:
|
||||
$(srcdir)/mkinstalldirs $(prefix) $(makedir)
|
||||
$(srcdir)/mkinstalldirs $(prefix) $(makedir) \
|
||||
$(makedir)/$(GNUSTEP_TARGET_CPU) \
|
||||
$(makedir)/$(GNUSTEP_TARGET_DIR)
|
||||
cp config.guess $(makedir)
|
||||
cp config.sub $(makedir)
|
||||
cp cpu.sh $(makedir)
|
||||
cp vendor.sh $(makedir)
|
||||
|
@ -46,13 +55,14 @@ install:
|
|||
cp aggregate.make $(makedir)
|
||||
cp application.make $(makedir)
|
||||
cp bundle.make $(makedir)
|
||||
cp clean.make $(makedir)
|
||||
cp common.make $(makedir)
|
||||
cp config.make $(makedir)
|
||||
cp core.make $(makedir)
|
||||
cp library.make $(makedir)
|
||||
cp rules.make $(makedir)
|
||||
cp target.make $(makedir)
|
||||
cp tool.make $(makedir)
|
||||
cp config.make $(makedir)/$(GNUSTEP_TARGET_DIR)
|
||||
|
||||
uninstall:
|
||||
rm -rf $(makedir)
|
||||
|
|
|
@ -7,6 +7,10 @@
|
|||
# be put into Makefile.postamble.
|
||||
#
|
||||
|
||||
#
|
||||
# Flags dealing with compiling and linking
|
||||
#
|
||||
|
||||
# Additional flags to pass to the preprocessor
|
||||
ADDITIONAL_CPPFLAGS =
|
||||
|
||||
|
@ -24,3 +28,10 @@ ADDITIONAL_LDFLAGS =
|
|||
|
||||
# Additional library directories the linker should search
|
||||
ADDITIONAL_LIB_DIRS =
|
||||
|
||||
#
|
||||
# Flags dealing with installing and uninstalling
|
||||
#
|
||||
|
||||
# Additional directories to be created during installation
|
||||
ADDITIONAL_INSTALL_DIRS =
|
||||
|
|
|
@ -18,3 +18,53 @@
|
|||
# License along with this library; see the file COPYING.LIB.
|
||||
# If not, write to the Free Software Foundation,
|
||||
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#
|
||||
# Include in the common makefile rules
|
||||
#
|
||||
include $(GNUSTEP_ROOT)/Makefiles/rules.make
|
||||
|
||||
LINK_CMD = $(CC) $(ALL_CFLAGS) $@$(OEXT) -o $@ $(ALL_LDFLAGS)
|
||||
|
||||
#
|
||||
# The name of the library is in the LIBRARY_NAME variable.
|
||||
#
|
||||
|
||||
APP_DIR_NAME := $(foreach app,$(APP_NAME),$(app).app)
|
||||
APP_FILE = $(APP_DIR_NAME)/$(GNUSTEP_TARGET_DIR)/$(LIBRARY_COMBO)/$(APP_NAME)$(EXEEXT)
|
||||
|
||||
#
|
||||
# Internal targets
|
||||
#
|
||||
|
||||
stamp-% : $(C_OBJ_FILES) $(OBJC_OBJ_FILES)
|
||||
$(LD) $(ALL_LDFLAGS) $(LDOUT)$(APP_FILE) \
|
||||
$(C_OBJ_FILES) $(OBJC_OBJ_FILES) \
|
||||
$(ALL_LIB_DIRS) $(ALL_GUI_LIBS)
|
||||
touch $@
|
||||
|
||||
#
|
||||
# Compilation targets
|
||||
#
|
||||
internal-all:: $(APP_DIR_NAME)
|
||||
|
||||
internal-app-all:: build-app-dir build-app
|
||||
|
||||
build-app-dir::
|
||||
$(GNUSTEP_MAKEFILES)/mkinstalldirs \
|
||||
$(APP_DIR_NAME) \
|
||||
$(APP_DIR_NAME)/$(GNUSTEP_TARGET_CPU) \
|
||||
$(APP_DIR_NAME)/$(GNUSTEP_TARGET_DIR) \
|
||||
$(APP_DIR_NAME)/$(GNUSTEP_TARGET_DIR)/$(LIBRARY_COMBO)
|
||||
|
||||
build-app:: stamp-$(APP_NAME)
|
||||
|
||||
#
|
||||
# Cleaning targets
|
||||
#
|
||||
internal-clean::
|
||||
for f in $(APP_DIR_NAME); do \
|
||||
rm -rf $$f ; \
|
||||
done
|
||||
|
||||
internal-distclean:: clean
|
||||
|
|
34
clean.make
Normal file
34
clean.make
Normal file
|
@ -0,0 +1,34 @@
|
|||
#
|
||||
# clean.make
|
||||
#
|
||||
# Clean up the target names
|
||||
#
|
||||
# Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
#
|
||||
# Author: Scott Christley <scottc@net-community.com>
|
||||
#
|
||||
# This file is part of the GNUstep Makefile Package.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this library; see the file COPYING.LIB.
|
||||
# If not, write to the Free Software Foundation,
|
||||
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# Intel processors are made equivalent
|
||||
ifeq ($(GNUSTEP_TARGET_CPU),i386)
|
||||
GNUSTEP_TARGET_CPU=ix86
|
||||
endif
|
||||
ifeq ($(GNUSTEP_TARGET_CPU),i486)
|
||||
GNUSTEP_TARGET_CPU=ix86
|
||||
endif
|
||||
ifeq ($(GNUSTEP_TARGET_CPU),i586)
|
||||
GNUSTEP_TARGET_CPU=ix86
|
||||
endif
|
||||
ifeq ($(GNUSTEP_TARGET_CPU),i686)
|
||||
GNUSTEP_TARGET_CPU=ix86
|
||||
endif
|
67
common.make
67
common.make
|
@ -20,15 +20,27 @@
|
|||
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#
|
||||
# Get the config information
|
||||
# Scripts to run for parsing canonical names
|
||||
#
|
||||
include $(GNUSTEP_ROOT)/Makefiles/config.make
|
||||
CONFIG_GUESS_SCRIPT = $(GNUSTEP_ROOT)/Makefiles/config.guess
|
||||
CONFIG_SUB_SCRIPT = $(GNUSTEP_ROOT)/Makefiles/config.sub
|
||||
CONFIG_CPU_SCRIPT = $(GNUSTEP_ROOT)/Makefiles/cpu.sh
|
||||
CONFIG_VENDOR_SCRIPT = $(GNUSTEP_ROOT)/Makefiles/vendor.sh
|
||||
CONFIG_OS_SCRIPT = $(GNUSTEP_ROOT)/Makefiles/os.sh
|
||||
|
||||
#
|
||||
# Determine the compilation target
|
||||
# Determine the compilation host and target
|
||||
#
|
||||
include $(GNUSTEP_ROOT)/Makefiles/target.make
|
||||
|
||||
GNUSTEP_HOST_DIR = $(GNUSTEP_HOST_CPU)/$(GNUSTEP_HOST_OS)
|
||||
GNUSTEP_TARGET_DIR = $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)
|
||||
|
||||
#
|
||||
# Get the config information
|
||||
#
|
||||
include $(GNUSTEP_ROOT)/Makefiles/$(GNUSTEP_TARGET_DIR)/config.make
|
||||
|
||||
#
|
||||
# Determine the core libraries
|
||||
#
|
||||
|
@ -37,30 +49,55 @@ include $(GNUSTEP_ROOT)/Makefiles/core.make
|
|||
#
|
||||
# Variables specifying the installation directory paths
|
||||
#
|
||||
GNUSTEP_HOST_DIR = $(GNUSTEP_HOST_CPU)/$(GNUSTEP_HOST_OS)
|
||||
GNUSTEP_TARGET_DIR = $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)
|
||||
GNUSTEP_APPS = $(GNUSTEP_ROOT)/Apps
|
||||
GNUSTEP_TOOLS = $(GNUSTEP_ROOT)/Tools
|
||||
GNUSTEP_HEADERS_ROOT = $(GNUSTEP_ROOT)/Headers
|
||||
GNUSTEP_HEADERS = $(GNUSTEP_ROOT)/Headers
|
||||
GNUSTEP_LIBRARIES_ROOT = $(GNUSTEP_ROOT)/Libraries
|
||||
GNUSTEP_LIBRARIES = $(GNUSTEP_LIBRARIES_ROOT)/$(GNUSTEP_TARGET_DIR)/$(LIBRARY_COMBO)
|
||||
GNUSTEP_MAKEFILES = $(GNUSTEP_ROOT)/Makefiles
|
||||
|
||||
#
|
||||
# Determine header subdirectory based upon library combo
|
||||
# Determine Foundation header subdirectory based upon library combo
|
||||
#
|
||||
SUB_HEADER =
|
||||
FND_HEADER =
|
||||
|
||||
ifeq ($(FOUNDATION_LIB),gnu)
|
||||
|
||||
SUB_HEADER = /gnustep
|
||||
|
||||
FND_HEADER = /gnustep/base
|
||||
endif
|
||||
|
||||
ifeq ($(FOUNDATION_LIB),fd)
|
||||
|
||||
SUB_HEADER = /libFoundation
|
||||
|
||||
FND_HEADER = /libFoundation
|
||||
endif
|
||||
|
||||
GNUSTEP_HEADERS = $(GNUSTEP_HEADERS_ROOT)$(SUB_HEADER)
|
||||
GNUSTEP_HEADERS_FND = $(GNUSTEP_HEADERS)$(FND_HEADER)
|
||||
|
||||
#
|
||||
# Determine AppKit header subdirectory based upon library combo
|
||||
#
|
||||
APP_HEADER =
|
||||
|
||||
ifeq ($(GUI_LIB),gnu)
|
||||
APP_HEADER = /gnustep/gui
|
||||
endif
|
||||
|
||||
GNUSTEP_HEADERS_GUI = $(GNUSTEP_HEADERS)$(APP_HEADER)
|
||||
|
||||
#
|
||||
# Overridable compilation flags
|
||||
#
|
||||
DEBUGFLAG = -g
|
||||
OPTFLAG = -O2
|
||||
OBJCFLAGS = -Wno-implicit -Wno-import -Wall
|
||||
CFLAGS = -Wall
|
||||
|
||||
ifeq ($(OBJC_RUNTIME_LIB),gnu)
|
||||
RUNTIME_FLAG = -fgnu-runtime
|
||||
endif
|
||||
|
||||
ifeq ($(OBJC_RUNTIME_LIB),nx)
|
||||
RUNTIME_FLAG = -fnext-runtime
|
||||
endif
|
||||
|
||||
INTERNAL_OBJCFLAGS = $(DEBUGFLAG) $(OPTFLAG) $(OBJCFLAGS) $(RUNTIME_FLAG)
|
||||
INTERNAL_CFLAGS = $(DEBUGFLAG) $(OPTFLAG) $(CFLAGS) $(RUNTIME_FLAG)
|
||||
INTERNAL_LDFLAGS = $(LDFLAGS)
|
||||
|
|
|
@ -20,30 +20,6 @@
|
|||
# If not, write to the Free Software Foundation,
|
||||
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#
|
||||
# The host information
|
||||
#
|
||||
GNUSTEP_HOST = @host@
|
||||
GNUSTEP_HOST_CPU = @host_cpu@
|
||||
GNUSTEP_HOST_VENDOR = @host_vendor@
|
||||
GNUSTEP_HOST_OS = @host_os@
|
||||
|
||||
#
|
||||
# The target information
|
||||
#
|
||||
CONFIG_TARGET = @target@
|
||||
CONFIG_TARGET_CPU = @target_cpu@
|
||||
CONFIG_TARGET_VENDOR = @target_vendor@
|
||||
CONFIG_TARGET_OS = @target_os@
|
||||
|
||||
#
|
||||
# Scripts to run for parsing canonical names
|
||||
#
|
||||
CONFIG_SUB_SCRIPT = $(GNUSTEP_ROOT)/Makefiles/config.sub
|
||||
CONFIG_CPU_SCRIPT = $(GNUSTEP_ROOT)/Makefiles/cpu.sh
|
||||
CONFIG_VENDOR_SCRIPT = $(GNUSTEP_ROOT)/Makefiles/vendor.sh
|
||||
CONFIG_OS_SCRIPT = $(GNUSTEP_ROOT)/Makefiles/os.sh
|
||||
|
||||
#
|
||||
# Binary and compile tools
|
||||
#
|
||||
|
@ -72,3 +48,9 @@ DLLTOOL = @DLLTOOL@
|
|||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
|
||||
#
|
||||
# X Window System headers and libraries
|
||||
#
|
||||
X_INCLUDE := @X_INCLUDE@
|
||||
X_LIBS := @X_LIBS@
|
||||
|
|
311
configure
vendored
311
configure
vendored
|
@ -16,6 +16,8 @@ echo /usr/GNUstep ;
|
|||
else
|
||||
echo $GNUSTEP_ROOT ;
|
||||
fi`
|
||||
ac_help="$ac_help
|
||||
--with-x use the X Window System"
|
||||
|
||||
# Initialize some variables set by options.
|
||||
# The variables have the same names as the options, with
|
||||
|
@ -600,7 +602,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
|
|||
fi
|
||||
|
||||
echo $ac_n "checking host system type""... $ac_c" 1>&6
|
||||
echo "configure:604: checking host system type" >&5
|
||||
echo "configure:606: checking host system type" >&5
|
||||
|
||||
host_alias=$host
|
||||
case "$host_alias" in
|
||||
|
@ -621,7 +623,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
|||
echo "$ac_t""$host" 1>&6
|
||||
|
||||
echo $ac_n "checking target system type""... $ac_c" 1>&6
|
||||
echo "configure:625: checking target system type" >&5
|
||||
echo "configure:627: checking target system type" >&5
|
||||
|
||||
target_alias=$target
|
||||
case "$target_alias" in
|
||||
|
@ -639,7 +641,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
|||
echo "$ac_t""$target" 1>&6
|
||||
|
||||
echo $ac_n "checking build system type""... $ac_c" 1>&6
|
||||
echo "configure:643: checking build system type" >&5
|
||||
echo "configure:645: checking build system type" >&5
|
||||
|
||||
build_alias=$build
|
||||
case "$build_alias" in
|
||||
|
@ -668,7 +670,7 @@ test "$host_alias" != "$target_alias" &&
|
|||
# Extract the first word of "gcc", so it can be a program name with args.
|
||||
set dummy gcc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:672: checking for $ac_word" >&5
|
||||
echo "configure:674: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -697,7 +699,7 @@ if test -z "$CC"; then
|
|||
# Extract the first word of "cc", so it can be a program name with args.
|
||||
set dummy cc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:701: checking for $ac_word" >&5
|
||||
echo "configure:703: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -745,7 +747,7 @@ fi
|
|||
fi
|
||||
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
||||
echo "configure:749: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
echo "configure:751: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
|
||||
ac_ext=c
|
||||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||
|
@ -755,11 +757,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
|
|||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 759 "configure"
|
||||
#line 761 "configure"
|
||||
#include "confdefs.h"
|
||||
main(){return(0);}
|
||||
EOF
|
||||
if { (eval echo configure:763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
ac_cv_prog_cc_works=yes
|
||||
# If we can't run a trivial program, we are probably using a cross compiler.
|
||||
if (./conftest; exit) 2>/dev/null; then
|
||||
|
@ -779,12 +781,12 @@ if test $ac_cv_prog_cc_works = no; then
|
|||
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
|
||||
fi
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
||||
echo "configure:783: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "configure:785: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
||||
echo "configure:788: checking whether we are using GNU C" >&5
|
||||
echo "configure:790: checking whether we are using GNU C" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -793,7 +795,7 @@ else
|
|||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
ac_cv_prog_gcc=yes
|
||||
else
|
||||
ac_cv_prog_gcc=no
|
||||
|
@ -808,7 +810,7 @@ if test $ac_cv_prog_gcc = yes; then
|
|||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS=
|
||||
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
|
||||
echo "configure:812: checking whether ${CC-cc} accepts -g" >&5
|
||||
echo "configure:814: checking whether ${CC-cc} accepts -g" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -836,7 +838,7 @@ else
|
|||
fi
|
||||
|
||||
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
||||
echo "configure:840: checking how to run the C preprocessor" >&5
|
||||
echo "configure:842: checking how to run the C preprocessor" >&5
|
||||
# On Suns, sometimes $CPP names a directory.
|
||||
if test -n "$CPP" && test -d "$CPP"; then
|
||||
CPP=
|
||||
|
@ -851,13 +853,13 @@ else
|
|||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 855 "configure"
|
||||
#line 857 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
|
@ -868,13 +870,13 @@ else
|
|||
rm -rf conftest*
|
||||
CPP="${CC-cc} -E -traditional-cpp"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 872 "configure"
|
||||
#line 874 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
|
@ -907,7 +909,7 @@ echo "$ac_t""$CPP" 1>&6
|
|||
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
|
||||
# ./install, which can be erroneously created by make from ./install.sh.
|
||||
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
|
||||
echo "configure:911: checking for a BSD compatible install" >&5
|
||||
echo "configure:913: checking for a BSD compatible install" >&5
|
||||
if test -z "$INSTALL"; then
|
||||
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -959,7 +961,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
|
|||
# Extract the first word of "ranlib", so it can be a program name with args.
|
||||
set dummy ranlib; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:963: checking for $ac_word" >&5
|
||||
echo "configure:965: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -986,7 +988,7 @@ else
|
|||
fi
|
||||
|
||||
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
|
||||
echo "configure:990: checking whether ln -s works" >&5
|
||||
echo "configure:992: checking whether ln -s works" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1007,6 +1009,273 @@ else
|
|||
fi
|
||||
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Find for X windows
|
||||
#--------------------------------------------------------------------
|
||||
# If we find X, set shell vars x_includes and x_libraries to the
|
||||
# paths, otherwise set no_x=yes.
|
||||
# Uses ac_ vars as temps to allow command line to override cache and checks.
|
||||
# --without-x overrides everything else, but does not touch the cache.
|
||||
echo $ac_n "checking for X""... $ac_c" 1>&6
|
||||
echo "configure:1021: checking for X" >&5
|
||||
|
||||
# Check whether --with-x or --without-x was given.
|
||||
if test "${with_x+set}" = set; then
|
||||
withval="$with_x"
|
||||
:
|
||||
fi
|
||||
|
||||
# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
|
||||
if test "x$with_x" = xno; then
|
||||
# The user explicitly disabled X.
|
||||
have_x=disabled
|
||||
else
|
||||
if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
|
||||
# Both variables are already set.
|
||||
have_x=yes
|
||||
else
|
||||
if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
# One or both of the vars are not set, and there is no cached value.
|
||||
ac_x_includes=NO ac_x_libraries=NO
|
||||
rm -fr conftestdir
|
||||
if mkdir conftestdir; then
|
||||
cd conftestdir
|
||||
# Make sure to not put "make" in the Imakefile rules, since we grep it out.
|
||||
cat > Imakefile <<'EOF'
|
||||
acfindx:
|
||||
@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
|
||||
EOF
|
||||
if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
|
||||
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
|
||||
eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
|
||||
# Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
|
||||
for ac_extension in a so sl; do
|
||||
if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
|
||||
test -f $ac_im_libdir/libX11.$ac_extension; then
|
||||
ac_im_usrlibdir=$ac_im_libdir; break
|
||||
fi
|
||||
done
|
||||
# Screen out bogus values from the imake configuration. They are
|
||||
# bogus both because they are the default anyway, and because
|
||||
# using them would break gcc on systems where it needs fixed includes.
|
||||
case "$ac_im_incroot" in
|
||||
/usr/include) ;;
|
||||
*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
|
||||
esac
|
||||
case "$ac_im_usrlibdir" in
|
||||
/usr/lib | /lib) ;;
|
||||
*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
|
||||
esac
|
||||
fi
|
||||
cd ..
|
||||
rm -fr conftestdir
|
||||
fi
|
||||
|
||||
if test "$ac_x_includes" = NO; then
|
||||
# Guess where to find include files, by looking for this one X11 .h file.
|
||||
test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
|
||||
|
||||
# First, try using that file with no special directory specified.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1083 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$x_direct_test_include>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
# We can compile using X headers with no special include directory.
|
||||
ac_x_includes=
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
# Look for the header file in a standard set of common directories.
|
||||
# Check X11 before X11Rn because it is often a symlink to the current release.
|
||||
for ac_dir in \
|
||||
/usr/X11/include \
|
||||
/usr/X11R6/include \
|
||||
/usr/X11R5/include \
|
||||
/usr/X11R4/include \
|
||||
\
|
||||
/usr/include/X11 \
|
||||
/usr/include/X11R6 \
|
||||
/usr/include/X11R5 \
|
||||
/usr/include/X11R4 \
|
||||
\
|
||||
/usr/local/X11/include \
|
||||
/usr/local/X11R6/include \
|
||||
/usr/local/X11R5/include \
|
||||
/usr/local/X11R4/include \
|
||||
\
|
||||
/usr/local/include/X11 \
|
||||
/usr/local/include/X11R6 \
|
||||
/usr/local/include/X11R5 \
|
||||
/usr/local/include/X11R4 \
|
||||
\
|
||||
/usr/X386/include \
|
||||
/usr/x386/include \
|
||||
/usr/XFree86/include/X11 \
|
||||
\
|
||||
/usr/include \
|
||||
/usr/local/include \
|
||||
/usr/unsupported/include \
|
||||
/usr/athena/include \
|
||||
/usr/local/x11r5/include \
|
||||
/usr/lpp/Xamples/include \
|
||||
\
|
||||
/usr/openwin/include \
|
||||
/usr/openwin/share/include \
|
||||
; \
|
||||
do
|
||||
if test -r "$ac_dir/$x_direct_test_include"; then
|
||||
ac_x_includes=$ac_dir
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi # $ac_x_includes = NO
|
||||
|
||||
if test "$ac_x_libraries" = NO; then
|
||||
# Check for the libraries.
|
||||
|
||||
test -z "$x_direct_test_library" && x_direct_test_library=Xt
|
||||
test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
|
||||
|
||||
# See if we find them without any special options.
|
||||
# Don't add to $LIBS permanently.
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-l$x_direct_test_library $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1157 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
${x_direct_test_function}()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
LIBS="$ac_save_LIBS"
|
||||
# We can link X programs with no special library path.
|
||||
ac_x_libraries=
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
LIBS="$ac_save_LIBS"
|
||||
# First see if replacing the include by lib works.
|
||||
# Check X11 before X11Rn because it is often a symlink to the current release.
|
||||
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
|
||||
/usr/X11/lib \
|
||||
/usr/X11R6/lib \
|
||||
/usr/X11R5/lib \
|
||||
/usr/X11R4/lib \
|
||||
\
|
||||
/usr/lib/X11 \
|
||||
/usr/lib/X11R6 \
|
||||
/usr/lib/X11R5 \
|
||||
/usr/lib/X11R4 \
|
||||
\
|
||||
/usr/local/X11/lib \
|
||||
/usr/local/X11R6/lib \
|
||||
/usr/local/X11R5/lib \
|
||||
/usr/local/X11R4/lib \
|
||||
\
|
||||
/usr/local/lib/X11 \
|
||||
/usr/local/lib/X11R6 \
|
||||
/usr/local/lib/X11R5 \
|
||||
/usr/local/lib/X11R4 \
|
||||
\
|
||||
/usr/X386/lib \
|
||||
/usr/x386/lib \
|
||||
/usr/XFree86/lib/X11 \
|
||||
\
|
||||
/usr/lib \
|
||||
/usr/local/lib \
|
||||
/usr/unsupported/lib \
|
||||
/usr/athena/lib \
|
||||
/usr/local/x11r5/lib \
|
||||
/usr/lpp/Xamples/lib \
|
||||
/lib/usr/lib/X11 \
|
||||
\
|
||||
/usr/openwin/lib \
|
||||
/usr/openwin/share/lib \
|
||||
; \
|
||||
do
|
||||
for ac_extension in a so sl; do
|
||||
if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
|
||||
ac_x_libraries=$ac_dir
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi # $ac_x_libraries = NO
|
||||
|
||||
if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
|
||||
# Didn't find X anywhere. Cache the known absence of X.
|
||||
ac_cv_have_x="have_x=no"
|
||||
else
|
||||
# Record where we found X for the cache.
|
||||
ac_cv_have_x="have_x=yes \
|
||||
ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
eval "$ac_cv_have_x"
|
||||
fi # $with_x != no
|
||||
|
||||
if test "$have_x" != yes; then
|
||||
echo "$ac_t""$have_x" 1>&6
|
||||
no_x=yes
|
||||
else
|
||||
# If each of the values was on the command line, it overrides each guess.
|
||||
test "x$x_includes" = xNONE && x_includes=$ac_x_includes
|
||||
test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
|
||||
# Update the cache value to reflect the command line values.
|
||||
ac_cv_have_x="have_x=yes \
|
||||
ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
|
||||
echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
|
||||
fi
|
||||
|
||||
X_INCLUDE=""
|
||||
if test -n "$x_includes"; then
|
||||
X_INCLUDE="-I$x_includes"
|
||||
fi
|
||||
X_LIBS=""
|
||||
if test -n "$x_libraries"; then
|
||||
X_LIBS="-L$x_libraries"
|
||||
fi
|
||||
|
||||
# You'd think something standard like X11 would come with standard libraries!
|
||||
echo "checking for specific X-Windows libraries we might need" 1>&6
|
||||
echo "configure:1261: checking for specific X-Windows libraries we might need" >&5
|
||||
# add Xmu library if we have it
|
||||
for xfile in $x_libraries/libXmu.*; do
|
||||
if (test -r $xfile); then
|
||||
WIDGET_LIBS="${WIDGET_LIBS} -lXmu"
|
||||
break
|
||||
fi
|
||||
done
|
||||
# add Xext library if we have it
|
||||
for xfile in $x_libraries/libXext.*; do
|
||||
if (test -r $xfile); then
|
||||
WIDGET_LIBS="${WIDGET_LIBS} -lXext"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Produce the output files
|
||||
#--------------------------------------------------------------------
|
||||
|
@ -1174,6 +1443,8 @@ s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
|
|||
s%@INSTALL_DATA@%$INSTALL_DATA%g
|
||||
s%@RANLIB@%$RANLIB%g
|
||||
s%@LN_S@%$LN_S%g
|
||||
s%@X_INCLUDE@%$X_INCLUDE%g
|
||||
s%@X_LIBS@%$X_LIBS%g
|
||||
|
||||
CEOF
|
||||
EOF
|
||||
|
|
33
configure.in
33
configure.in
|
@ -44,6 +44,39 @@ AC_PROG_INSTALL
|
|||
AC_PROG_RANLIB
|
||||
AC_LN_S
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Find for X windows
|
||||
#--------------------------------------------------------------------
|
||||
AC_PATH_X
|
||||
X_INCLUDE=""
|
||||
if test -n "$x_includes"; then
|
||||
X_INCLUDE="-I$x_includes"
|
||||
fi
|
||||
X_LIBS=""
|
||||
if test -n "$x_libraries"; then
|
||||
X_LIBS="-L$x_libraries"
|
||||
fi
|
||||
|
||||
# You'd think something standard like X11 would come with standard libraries!
|
||||
AC_CHECKING(for specific X-Windows libraries we might need)
|
||||
# add Xmu library if we have it
|
||||
for xfile in $x_libraries/libXmu.*; do
|
||||
if (test -r $xfile); then
|
||||
WIDGET_LIBS="${WIDGET_LIBS} -lXmu"
|
||||
break
|
||||
fi
|
||||
done
|
||||
# add Xext library if we have it
|
||||
for xfile in $x_libraries/libXext.*; do
|
||||
if (test -r $xfile); then
|
||||
WIDGET_LIBS="${WIDGET_LIBS} -lXext"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
AC_SUBST(X_INCLUDE)
|
||||
AC_SUBST(X_LIBS)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Produce the output files
|
||||
#--------------------------------------------------------------------
|
||||
|
|
78
core.make
78
core.make
|
@ -53,3 +53,81 @@ GUI_BACKEND_LIB = $(word 4,$(combo_list))
|
|||
endif
|
||||
|
||||
LIBRARY_COMBO = $(OBJC_RUNTIME_LIB)_$(FOUNDATION_LIB)_$(GUI_LIB)_$(GUI_BACKEND_LIB)
|
||||
|
||||
OBJC_LDFLAGS =
|
||||
OBJC_LIBS =
|
||||
#
|
||||
# Set the appropriate ObjC runtime library
|
||||
#
|
||||
ifeq ($(OBJC_RUNTIME_LIB),gnu)
|
||||
OBJC_LDFLAGS =
|
||||
OBJC_LIB_DIR =
|
||||
OBJC_LIBS = -lobjc
|
||||
endif
|
||||
|
||||
FND_LDFLAGS =
|
||||
FND_LIBS =
|
||||
#
|
||||
# Set the appropriate Foundation library
|
||||
#
|
||||
ifeq ($(FOUNDATION_LIB),gnu)
|
||||
FND_LDFLAGS =
|
||||
FND_LIBS = -lgnustep-base
|
||||
endif
|
||||
|
||||
ifeq ($(FOUNDATION_LIB),fd)
|
||||
FND_LDFLAGS =
|
||||
FND_LIBS = -lFoundation
|
||||
endif
|
||||
|
||||
GUI_LDFLAGS =
|
||||
GUI_LIBS =
|
||||
#
|
||||
# Set the GUI library
|
||||
#
|
||||
ifeq ($(GUI_LIB),gnu)
|
||||
GUI_LDFLAGS =
|
||||
GUI_LIBS = -lgnustep-gui
|
||||
endif
|
||||
|
||||
BACKEND_LDFLAGS =
|
||||
BACKEND_LIBS =
|
||||
#
|
||||
# Set the GUI Backend library
|
||||
#
|
||||
ifeq ($(GUI_BACKEND_LIB),xdp)
|
||||
BACKEND_LDFLAGS =
|
||||
BACKEND_LIBS = -lgnustep-xdps
|
||||
endif
|
||||
|
||||
ifeq ($(GUI_BACKEND_LIB),w32)
|
||||
BACKEND_LDFLAGS =
|
||||
BACKEND_LIBS = -lMBKit
|
||||
endif
|
||||
|
||||
SYSTEM_INCLUDES =
|
||||
SYSTEM_LDFLAGS =
|
||||
SYSTEM_LIB_DIR =
|
||||
SYSTEM_LIBS =
|
||||
#
|
||||
# If the backend GUI library is X based
|
||||
# then add X headers and libraries
|
||||
#
|
||||
ifeq ($(GUI_BACKEND_LIB),xdp)
|
||||
SYSTEM_INCLUDES = $(X_INCLUDE)
|
||||
SYSTEM_LDFLAGS =
|
||||
SYSTEM_LIB_DIR = $(X_LIBS)
|
||||
SYSTEM_LIBS = -ltiff -ldpstk -ldps -lpsres -lX11
|
||||
endif
|
||||
|
||||
#
|
||||
# If the backend GUI library is Win32 based
|
||||
# then add Win32 headers and libraries
|
||||
#
|
||||
ifeq ($(GUI_BACKEND_LIB),w32)
|
||||
SYSTEM_INCLUDES =
|
||||
SYSTEM_LDFLAGS =
|
||||
SYSTEM_LIB_DIR =
|
||||
SYSTEM_LIBS = -ltiff -lwsock32 -ladvapi32 -lcomctl32 -luser32 \
|
||||
-lgdi32 -lcomdlg32
|
||||
endif
|
||||
|
|
54
library.make
54
library.make
|
@ -27,19 +27,9 @@ include $(GNUSTEP_ROOT)/Makefiles/rules.make
|
|||
#
|
||||
# The name of the library is in the LIBRARY_NAME variable.
|
||||
#
|
||||
# The list of Objective-C source files to be compiled and put
|
||||
# in the librar are in the OBJC_FILES variable.
|
||||
#
|
||||
# The list of C source files to be compiled and put
|
||||
# in the librar are in the C_FILES variable.
|
||||
#
|
||||
|
||||
LIBRARY_FILE = $(LIBRARY_NAME)$(LIBEXT)
|
||||
|
||||
OBJC_OBJ_FILES = $(OBJC_FILES:.m=${OEXT})
|
||||
|
||||
C_OBJ_FILES = $(C_FILES:.c=${OEXT})
|
||||
|
||||
#
|
||||
# Internal targets
|
||||
#
|
||||
|
@ -47,20 +37,50 @@ C_OBJ_FILES = $(C_FILES:.c=${OEXT})
|
|||
#
|
||||
# Compilation targets
|
||||
#
|
||||
internal-all:: shared-library static-library import-library
|
||||
internal-all:: static-library shared-library import-library
|
||||
|
||||
static-library:: $(C_OBJ_FILES) $(OBJC_OBJ_FILES)
|
||||
$(AR) $(ARFLAGS) $(AROUT)$(LIBRARY_FILE) \
|
||||
$(C_OBJ_FILES) $(OBJC_OBJ_FILES)
|
||||
$(RANLIB) $(LIBRARY_FILE)
|
||||
|
||||
shared-library::
|
||||
|
||||
static-library:: $(OBJC_OBJ_FILES) $(C_OBJ_FILES)
|
||||
$(AR) $(ARFLAGS) $(AROUT)$(LIBRARY_FILE) \
|
||||
$(OBJC_OBJ_FILES) $(C_OBJ_FILES)
|
||||
$(RANLIB) $(LIBRARY_FILE)
|
||||
|
||||
import-library::
|
||||
|
||||
#
|
||||
# Install and uninstall targets
|
||||
#
|
||||
internal-install:: internal-install-dirs internal-install-headers \
|
||||
internal-install-libs
|
||||
|
||||
internal-install-dirs::
|
||||
$(GNUSTEP_MAKEFILES)/mkinstalldirs \
|
||||
$(GNUSTEP_LIBRARIES_ROOT) \
|
||||
$(GNUSTEP_LIBRARIES_ROOT)/$(GNUSTEP_TARGET_CPU) \
|
||||
$(GNUSTEP_LIBRARIES_ROOT)/$(GNUSTEP_TARGET_DIR) \
|
||||
$(GNUSTEP_LIBRARIES) \
|
||||
$(GNUSTEP_HEADERS) \
|
||||
$(ADDITIONAL_INSTALL_DIRS)
|
||||
|
||||
internal-install-headers::
|
||||
for file in $(HEADER_FILES); do \
|
||||
$(INSTALL_DATA) $(HEADER_FILES_DIR)/$$file \
|
||||
$(GNUSTEP_HEADERS)$(HEADER_FILES_INSTALL_DIR)/$$file ; \
|
||||
done
|
||||
|
||||
internal-install-libs:: internal-install-static-lib \
|
||||
internal-install-shared-lib internal-install-import-lib
|
||||
|
||||
internal-install-static-lib::
|
||||
if [ -e $(LIBRARY_FILE) ]; then \
|
||||
$(INSTALL_PROGRAM) $(LIBRARY_FILE) $(GNUSTEP_LIBRARIES) ; \
|
||||
$(RANLIB) $(GNUSTEP_LIBRARIES)/$(LIBRARY_FILE) ; \
|
||||
fi
|
||||
|
||||
internal-install-shared-lib::
|
||||
|
||||
internal-install-import-lib::
|
||||
|
||||
#
|
||||
# Cleaning targets
|
||||
|
@ -68,6 +88,8 @@ import-library::
|
|||
internal-clean::
|
||||
rm -f $(OBJC_OBJ_FILES)
|
||||
rm -f $(C_OBJ_FILES)
|
||||
rm -f $(PSWRAP_C_FILES)
|
||||
rm -f $(PSWRAP_H_FILES)
|
||||
rm -f $(LIBRARY_FILE)
|
||||
|
||||
internal-distclean:: clean
|
||||
|
|
58
rules.make
58
rules.make
|
@ -21,15 +21,27 @@
|
|||
|
||||
ALL_CPPFLAGS = $(CPPFLAGS) $(ADDITIONAL_CPPFLAGS)
|
||||
|
||||
ALL_OBJCFLAGS = $(OBJCFLAGS) $(ADDITIONAL_OBJCFLAGS) \
|
||||
$(ADDITIONAL_INCLUDE_DIRS) \
|
||||
-I$(GNUSTEP_HEADER) -I$(GNUSTEP_HEADERS_ROOT)
|
||||
ALL_OBJCFLAGS = $(INTERNAL_OBJCFLAGS) $(ADDITIONAL_OBJCFLAGS) \
|
||||
$(ADDITIONAL_INCLUDE_DIRS) $(SYSTEM_INCLUDES) \
|
||||
-I$(GNUSTEP_HEADERS_FND) -I$(GNUSTEP_HEADERS_GUI) -I$(GNUSTEP_HEADERS)
|
||||
|
||||
ALL_CFLAGS = $(CFLAGS) $(ADDITIONAL_CFLAGS) \
|
||||
$(ADDITIONAL_INCLUDE_DIRS) \
|
||||
-I$(GNUSTEP_HEADER) -I$(GNUSTEP_HEADERS_ROOT)
|
||||
ALL_CFLAGS = $(INTERNAL_CFLAGS) $(ADDITIONAL_CFLAGS) \
|
||||
$(ADDITIONAL_INCLUDE_DIRS) $(SYSTEM_INCLUDES) \
|
||||
-I$(GNUSTEP_HEADERS_FND) -I$(GNUSTEP_HEADERS_GUI) -I$(GNUSTEP_HEADERS)
|
||||
|
||||
.SUFFIXES: .m .c
|
||||
ALL_LDFLAGS = $(INTERNAL_LDFLAGS) $(ADDITIONAL_LDFLAGS) \
|
||||
$(FND_LDFLAGS) $(GUI_LDFLAGS) $(BACKEND_LDFLAGS) \
|
||||
$(SYSTEM_LDFLAGS)
|
||||
|
||||
ALL_LIB_DIRS = $(ADDITIONAL_LIB_DIRS) -L$(GNUSTEP_LIBRARIES) $(SYSTEM_LIB_DIR)
|
||||
|
||||
ALL_TOOL_LIBS = $(ADDITIONAL_TOOL_LIBS) $(FND_LIBS) $(OBJC_LIBS) \
|
||||
$(TARGET_SYSTEM_LIBS)
|
||||
|
||||
ALL_GUI_LIBS = $(ADDITIONAL_GUI_LIBS) $(BACKEND_LIBS) $(GUI_LIBS) \
|
||||
$(FND_LIBS) $(OBJC_LIBS) $(SYSTEM_LIBS) $(TARGET_SYSTEM_LIBS)
|
||||
|
||||
.SUFFIXES: .m .c .psw
|
||||
|
||||
%${OEXT} : %.m
|
||||
$(CC) -c $(ALL_CPPFLAGS) $(ALL_OBJCFLAGS) -o $@ $<
|
||||
|
@ -37,6 +49,9 @@ ALL_CFLAGS = $(CFLAGS) $(ADDITIONAL_CFLAGS) \
|
|||
%${OEXT} : %.c
|
||||
$(CC) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) -o $@ $<
|
||||
|
||||
%.c : %.psw
|
||||
pswrap -h $*.h -o $@ $<
|
||||
|
||||
%_pic${OEXT}: %.m
|
||||
$(CC) -c $(ALL_CPPFLAGS) -fPIC -DPIC \
|
||||
$(ALL_OBJCFLAGS) -o $@ $<
|
||||
|
@ -45,6 +60,33 @@ ALL_CFLAGS = $(CFLAGS) $(ADDITIONAL_CFLAGS) \
|
|||
$(CC) -c $(ALL_CPPFLAGS) -fPIC -DPIC \
|
||||
$(ALL_CFLAGS) -o $@ $<
|
||||
|
||||
# The magical app rule, thank you GNU make!
|
||||
%.app : FORCE
|
||||
@echo Making $*...
|
||||
$(MAKE) internal-app-all $(MAKEFLAGS) \
|
||||
APP_NAME=$* \
|
||||
OBJC_FILES="$($*_OBJC_FILES)" \
|
||||
C_FILES="$($*_C_FILES)" \
|
||||
PSWRAP_FILES="$($*_PSWRAP_FILES)"
|
||||
|
||||
#
|
||||
# The list of Objective-C source files to be compiled
|
||||
# are in the OBJC_FILES variable.
|
||||
#
|
||||
# The list of C source files to be compiled
|
||||
# are in the C_FILES variable.
|
||||
#
|
||||
# The list of PSWRAP source files to be compiled
|
||||
# are in the PSWRAP_FILES variable.
|
||||
|
||||
OBJC_OBJ_FILES = $(OBJC_FILES:.m=${OEXT})
|
||||
|
||||
PSWRAP_C_FILES = $(PSWRAP_FILES:.psw=.c)
|
||||
PSWRAP_H_FILES = $(PSWRAP_FILES:.psw=.h)
|
||||
PSWRAP_OBJ_FILES = $(PSWRAP_FILES:.psw=${OEXT})
|
||||
|
||||
C_OBJ_FILES = $(C_FILES:.c=${OEXT}) $(PSWRAP_OBJ_FILES)
|
||||
|
||||
#
|
||||
# Global targets
|
||||
#
|
||||
|
@ -99,3 +141,5 @@ before-check::
|
|||
internal-check::
|
||||
|
||||
after-check::
|
||||
|
||||
FORCE:
|
31
target.make
31
target.make
|
@ -19,17 +19,24 @@
|
|||
# If not, write to the Free Software Foundation,
|
||||
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# Run config.guess to guess the host
|
||||
|
||||
GNUSTEP_HOST = $(shell $(CONFIG_GUESS_SCRIPT))
|
||||
GNUSTEP_HOST_CPU = $(shell $(CONFIG_CPU_SCRIPT) $(GNUSTEP_HOST))
|
||||
GNUSTEP_HOST_VENDOR = $(shell $(CONFIG_VENDOR_SCRIPT) $(GNUSTEP_HOST))
|
||||
GNUSTEP_HOST_OS = $(shell $(CONFIG_OS_SCRIPT) $(GNUSTEP_HOST))
|
||||
|
||||
#
|
||||
# The user can specify a `target' variable when running make
|
||||
#
|
||||
|
||||
ifeq ($(strip $(target)),)
|
||||
|
||||
# The default target
|
||||
GNUSTEP_TARGET = $(CONFIG_TARGET)
|
||||
GNUSTEP_TARGET_CPU = $(CONFIG_TARGET_CPU)
|
||||
GNUSTEP_TARGET_VENDOR = $(CONFIG_TARGET_VENDOR)
|
||||
GNUSTEP_TARGET_OS = $(CONFIG_TARGET_OS)
|
||||
# The host is the default target
|
||||
GNUSTEP_TARGET = $(GNUSTEP_HOST)
|
||||
GNUSTEP_TARGET_CPU = $(GNUSTEP_HOST_CPU)
|
||||
GNUSTEP_TARGET_VENDOR = $(GNUSTEP_HOST_VENDOR)
|
||||
GNUSTEP_TARGET_OS = $(GNUSTEP_HOST_OS)
|
||||
|
||||
else
|
||||
|
||||
|
@ -47,4 +54,18 @@ endif
|
|||
#
|
||||
# Clean up the target names
|
||||
#
|
||||
include $(GNUSTEP_ROOT)/Makefiles/clean.make
|
||||
|
||||
#
|
||||
# Host and target specific settings
|
||||
#
|
||||
ifeq ($(GNUSTEP_TARGET_OS),solaris2)
|
||||
X_INCLUDES := $(X_INCLUDES)/X11
|
||||
endif
|
||||
|
||||
#
|
||||
# Target specific libraries
|
||||
#
|
||||
ifeq ($(GNUSTEP_TARGET_OS),linux-gnu)
|
||||
TARGET_SYSTEM_LIBS := -lpcthread -ldl -lm
|
||||
endif
|
Loading…
Reference in a new issue