]> err.no Git - sope/blob - gnustep-make/Master/clibrary.make
added gnustep-make vendor branch to trunk
[sope] / gnustep-make / Master / clibrary.make
1 #
2 #   Master/clibrary.make
3 #
4 #   Master Makefile rules to build C libraries.
5 #
6 #   Copyright (C) 1997, 2001 Free Software Foundation, Inc.
7 #
8 #   Author:  Scott Christley <scottc@net-community.com>
9 #            Ovidiu Predescu <ovidiu@net-community.com>
10 #            Nicola Pero     <nicola@brainstorm.co.uk>
11 #
12 #   This file is part of the GNUstep Makefile Package.
13 #
14 #   This library is free software; you can redistribute it and/or
15 #   modify it under the terms of the GNU General Public License
16 #   as published by the Free Software Foundation; either version 2
17 #   of the License, or (at your option) any later version.
18 #   
19 #   You should have received a copy of the GNU General Public
20 #   License along with this library; see the file COPYING.LIB.
21 #   If not, write to the Free Software Foundation,
22 #   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
24 ifeq ($(RULES_MAKE_LOADED),)
25 include $(GNUSTEP_MAKEFILES)/rules.make
26 endif
27
28 CLIBRARY_NAME := $(strip $(CLIBRARY_NAME))
29
30 internal-all:: $(CLIBRARY_NAME:=.all.clibrary.variables)
31
32 internal-install:: $(CLIBRARY_NAME:=.install.clibrary.variables)
33
34 internal-uninstall:: $(CLIBRARY_NAME:=.uninstall.clibrary.variables)
35
36 _PSWRAP_C_FILES = $(foreach lib,$(CLIBRARY_NAME),$($(lib)_PSWRAP_FILES:.psw=.c))
37 _PSWRAP_H_FILES = $(foreach lib,$(CLIBRARY_NAME),$($(lib)_PSWRAP_FILES:.psw=.h))
38
39 internal-clean::
40         (cd $(GNUSTEP_BUILD_DIR); \
41         rm -rf $(GNUSTEP_OBJ_DIR_NAME) $(_PSWRAP_C_FILES) $(_PSWRAP_H_FILES))
42
43 internal-distclean::
44         (cd $(GNUSTEP_BUILD_DIR); \
45         rm -rf shared_obj static_obj shared_debug_obj shared_profile_obj \
46           static_debug_obj static_profile_obj shared_profile_debug_obj \
47           static_profile_debug_obj)
48
49 CLIBRARIES_WITH_SUBPROJECTS = $(strip $(foreach clibrary,$(CLIBRARY_NAME),$(patsubst %,$(clibrary),$($(clibrary)_SUBPROJECTS))))
50 ifneq ($(CLIBRARIES_WITH_SUBPROJECTS),)
51 internal-clean:: $(CLIBRARIES_WITH_SUBPROJECTS:=.clean.clibrary.subprojects)
52 internal-distclean:: $(CLIBRARIES_WITH_SUBPROJECTS:=.distclean.clibrary.subprojects)
53 endif
54
55 internal-strings:: $(CLIBRARY_NAME:=.strings.clibrary.variables)
56
57 $(CLIBRARY_NAME):
58         @$(MAKE) -f $(MAKEFILE_NAME) --no-print-directory \
59                 $@.all.clibrary.variables