1#   -*-makefile-*-
2#   Master/objc.make
3#
4#   Master Makefile rules to build ObjC-based (but not GNUstep) programs.
5#
6#   Copyright (C) 1997, 2001 Free Software Foundation, Inc.
7#
8#   Author:  Scott Christley <scottc@net-community.com>
9#   Author:  Nicola Pero <nicola@brainstorm.co.uk>
10#
11#   This file is part of the GNUstep Makefile Package.
12#
13#   This library is free software; you can redistribute it and/or
14#   modify it under the terms of the GNU General Public License
15#   as published by the Free Software Foundation; either version 3
16#   of the License, or (at your option) any later version.
17#
18#   You should have received a copy of the GNU General Public
19#   License along with this library; see the file COPYING.
20#   If not, write to the Free Software Foundation,
21#   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22
23OBJC_PROGRAM_NAME := $(strip $(OBJC_PROGRAM_NAME))
24
25ifeq ($(RULES_MAKE_LOADED),)
26include $(GNUSTEP_MAKEFILES)/rules.make
27endif
28
29ifeq ($(GNUSTEP_MAKE_PARALLEL_BUILDING), no)
30
31internal-all:: $(GNUSTEP_OBJ_DIR) $(OBJC_PROGRAM_NAME:=.all.objc-program.variables)
32
33else
34
35internal-all:: $(GNUSTEP_OBJ_DIR)
36	$(ECHO_NOTHING_RECURSIVE_MAKE)$(MAKE) -f $(MAKEFILE_NAME) --no-print-directory --no-keep-going \
37	internal-master-objc-program-all \
38	GNUSTEP_BUILD_DIR="$(GNUSTEP_BUILD_DIR)" \
39	_GNUSTEP_MAKE_PARALLEL=yes$(END_ECHO_RECURSIVE_MAKE)
40
41.PHONY: internal-master-objc-program-all
42
43internal-master-objc-program-all: $(OBJC_PROGRAM_NAME:=.all.objc-program.variables)
44
45endif
46
47internal-install:: $(OBJC_PROGRAM_NAME:=.install.objc-program.variables)
48
49internal-uninstall:: $(OBJC_PROGRAM_NAME:=.uninstall.objc-program.variables)
50
51internal-clean::
52
53internal-distclean::
54
55OBJC_PROGRAMS_WITH_SUBPROJECTS = $(strip $(foreach objc_program,$(OBJC_PROGRAM_NAME),$(patsubst %,$(objc_program),$($(objc_program)_SUBPROJECTS))))
56ifneq ($(OBJC_PROGRAMS_WITH_SUBPROJECTS),)
57internal-clean:: $(OBJC_PROGRAMS_WITH_SUBPROJECTS:=.clean.objc-program.subprojects)
58internal-distclean:: $(OBJC_PROGRAMS_WITH_SUBPROJECTS:=.distclean.objc-program.subprojects)
59endif
60
61internal-strings:: $(OBJC_PROGRAM_NAME:=.strings.objc-program.variables)
62
63$(OBJC_PROGRAM_NAME): $(GNUSTEP_OBJ_DIR)
64	$(ECHO_NOTHING_RECURSIVE_MAKE)$(MAKE) -f $(MAKEFILE_NAME) --no-print-directory $@.all.objc-program.variables$(END_ECHO_RECURSIVE_MAKE)
65