Skip to content
Permalink
Browse files

Obey OBJROOT more. Darwinup still needs to be fixed.

git-svn-id: https://svn.macosforge.org/repository/darwinbuild/trunk@605 10a61168-4876-4dac-953b-31e694342555
  • Loading branch information
wsiegrist@apple.com
wsiegrist@apple.com committed Oct 23, 2009
1 parent 778f762 commit 789fc6e6865c9de542af7a869da1ce222a47903b
Showing with 27 additions and 19 deletions.
  1. +13 −10 darwinbuild/Makefile
  2. +4 −1 darwintrace/Makefile
  3. +4 −1 darwinup/Makefile
  4. +6 −7 darwinxref/Makefile
@@ -5,6 +5,8 @@ include ../common.mk
###
DATDIR:=$(DATDIR)/darwinbuild

override OBJROOT:=$(OBJROOT)/darwinbuild~obj

PrefixReplacements = darwinbuild \
darwinmaster.sh \
packageRoots.sh \
@@ -15,25 +17,27 @@ PrefixReplacements = darwinbuild \
all: manifest prefixes

manifest: manifest.c
@mkdir -p $(OBJROOT)
cc $(CFLAGS) -Wall -Werror -o $(OBJROOT)/$@ -lcrypto $^

prefixes: $(PrefixReplacements)

$(PrefixReplacements): % : %.in
$(SED) -e 's,%%PREFIX%%,$(PREFIX),' $@.in > $@ ;
@mkdir -p $(OBJROOT)
$(SED) -e 's,%%PREFIX%%,$(PREFIX),' $@.in > $(OBJROOT)/$@ ;

install: all
[ -d $(BINDIR) ] || $(INSTALL) -d $(INSTALL_DIR_FLAGS) $(BINDIR)
$(INSTALL) $(INSTALL_EXE_FLAGS) darwinbuild $(BINDIR)
$(INSTALL) $(INSTALL_EXE_FLAGS) darwinmaster.sh $(BINDIR)/darwinmaster
$(INSTALL) $(INSTALL_EXE_FLAGS) $(OBJROOT)/darwinbuild $(BINDIR)
$(INSTALL) $(INSTALL_EXE_FLAGS) $(OBJROOT)/darwinmaster.sh $(BINDIR)/darwinmaster

[ -d $(DATDIR) ] || $(INSTALL) -d $(INSTALL_DIR_FLAGS) $(DATDIR)
$(INSTALL) $(INSTALL_DOC_FLAGS) darwinbuild.common $(DATDIR)
$(INSTALL) $(INSTALL_EXE_FLAGS) installXcode $(DATDIR)
$(INSTALL) $(INSTALL_EXE_FLAGS) $(OBJROOT)/installXcode $(DATDIR)
$(INSTALL) $(INSTALL_EXE_FLAGS) installXcode2 $(DATDIR)
$(INSTALL) $(INSTALL_EXE_FLAGS) installXcode3 $(DATDIR)
$(INSTALL) $(INSTALL_EXE_FLAGS) installXcode31 $(DATDIR)
$(INSTALL) $(INSTALL_EXE_FLAGS) installXcode32 $(DATDIR)
$(INSTALL) $(INSTALL_EXE_FLAGS) $(OBJROOT)/installXcode32 $(DATDIR)
$(INSTALL) $(INSTALL_DOC_FLAGS) Info.plist $(DATDIR)
$(INSTALL) $(INSTALL_DOC_FLAGS) SDKSettings.plist $(DATDIR)

@@ -42,10 +46,10 @@ install: all
$(INSTALL) $(INSTALL_EXE_FLAGS) ditto.sh $(DATDIR)/ditto
$(INSTALL) $(INSTALL_EXE_FLAGS) buildlist.sh $(DATDIR)/buildlist
$(INSTALL) $(INSTALL_EXE_FLAGS) buildorder.pl $(DATDIR)/buildorder
$(INSTALL) $(INSTALL_EXE_FLAGS) packageRoots.sh $(DATDIR)/packageRoots
$(INSTALL) $(INSTALL_EXE_FLAGS) $(OBJROOT)/packageRoots.sh $(DATDIR)/packageRoots
$(INSTALL) $(INSTALL_EXE_FLAGS) synthfat.sh $(DATDIR)/synthfat
$(INSTALL) $(INSTALL_EXE_FLAGS) thinFile.sh $(DATDIR)/thinFile
$(INSTALL) $(INSTALL_EXE_FLAGS) thinPackages.sh $(DATDIR)/thinPackages
$(INSTALL) $(INSTALL_EXE_FLAGS) $(OBJROOT)/thinPackages.sh $(DATDIR)/thinPackages

uninstall:
rm -f $(BINDIR)/darwinbuild
@@ -70,6 +74,5 @@ uninstall:


clean:
rm -f manifest
@$(foreach SCRIPT,$(PrefixReplacements), \
rm -f $(SCRIPT) ; )
rm -rf $(OBJROOT)

@@ -7,6 +7,8 @@ LIBS=$(shell if [ -e /usr/lib/libSystemStubs.a ]; then echo -lSystemStubs; fi)
###
DATDIR:=$(DATDIR)/darwinbuild

override OBJROOT:=$(OBJROOT)/darwintrace~obj

all: darwintrace.dylib

VERSION=$(shell uname -r | cut -f1 -d. )
@@ -17,6 +19,7 @@ CFLAGS += -nodefaultlibs
endif

darwintrace.dylib: darwintrace.c
@mkdir -p $(OBJROOT)
cc -o $(OBJROOT)/$@ \
$(CFLAGS) \
-Wall -Werror -pedantic -std=c99 \
@@ -27,7 +30,7 @@ darwintrace.dylib: darwintrace.c
-dynamiclib \
$^ $(LIBS)
clean:
rm -f darwintrace.dylib
rm -rf $(OBJROOT)

install: all
[ -d $(DATDIR) ] || \
@@ -1,5 +1,7 @@
include ../common.mk

override OBJROOT:=$(OBJROOT)/darwinup~obj

CXXFLAGS=-g -Wall -Werror -Wno-non-virtual-dtor $(CFLAGS)
# libredo.o is generated from cctools_ofiles
REDO=$(shell if [ -f /usr/local/lib/libredo_prebinding.a ]; then \
@@ -27,4 +29,5 @@ uninstall:
rm -f $(BINDIR)/darwinup

clean:
rm -f darwinup Archive.o Depot.o Digest.o File.o SerialSet.o Utils.o main.o
rm -rf $(OBJROOT)

@@ -6,6 +6,8 @@ include ../common.mk
DATDIR:=$(DATDIR)/darwinxref
INCDIR:=$(INCDIR)/darwinbuild

override OBJROOT:=$(OBJROOT)/darwinxref~obj

SOURCES= \
DBDataStore.c \
DBPlugin.c \
@@ -75,15 +77,10 @@ uninstall:
-rmdir $(INCDIR)

clean:
rm -f darwinxref
rm -rf darwinxref.dSYM
rm -f $(SOURCES:.c=.o)
rm -f $(PLUGIN_SOURCES:.c=.so)
rm -rf $(PLUGIN_SOURCES:.c=.so.dSYM)
rm -f upgrade_plist
rm -rf upgrade_plist.dSYM
rm -rf $(OBJROOT)

darwinxref: $(SOURCES)
@mkdir -p $(OBJROOT)
@for CFILE in $(SOURCES); do \
OFILE=$$(echo $$(basename $${CFILE}) | sed -e 's,\.[^.]*$$,.o,') ; \
CMD="$(CC) $(CFLAGS) -c -o $(OBJROOT)/$${OFILE} $${CFILE}"; \
@@ -103,6 +100,7 @@ plugins/%.so: plugins/%.c DBPlugin.h darwinxref
cc $(CFLAGS) -o $(OBJROOT)/$@ $(PLUGIN_CFLAGS) $(PLUGIN_LDFLAGS) $<

plugins-darwinports/%.so: plugins-darwinports/%.c DBPlugin.h darwinxref
@mkdir -p $(OBJROOT)/plugins-darwinports
cc $(CFLAGS) -o $(OBJROOT)/$@ $(PLUGIN_CFLAGS) $(PLUGIN_LDFLAGS) $<

apple_plugins:
@@ -116,5 +114,6 @@ install_apple_plugins:
fi

upgrade_plist: upgrade_plist.c cfutils.c
@mkdir -p $(OBJROOT)
cc $(CFLAGS) -o $(OBJROOT)/$@ $(CFLAGS) $(LDFLAGS) $^

0 comments on commit 789fc6e

Please sign in to comment.
You can’t perform that action at this time.