-build-man:
- MAKEOBJDIR="$(OBJROOT)" MACHINE_ARCH="$(shell arch)" \
- MAKEFLAGS="" $(BSDMAKE) buildman
-build-static: build-ppc-static build-i386-static
- @echo "Checking for libc_static.a"
- @if [ -f "$(OBJROOT)/obj.ppc/libc_static.a" -a -f "$(OBJROOT)/obj.i386/libc_static.a" ]; then\
- lipo -create -arch ppc "$(OBJROOT)/obj.ppc/libc_static.a" \
- -arch i386 "$(OBJROOT)/obj.i386/libc_static.a" \
- -output $(SYMROOT)/libc_static.a;\
- elif [ -f "$(OBJROOT)/obj.ppc/libc_static.a" ]; then \
- cp -p "$(OBJROOT)/obj.ppc/libc_static.a" "$(SYMROOT)"; \
- elif [ -f "$(OBJROOT)/obj.i386/libc_static.a" ]; then \
- cp -p "$(OBJROOT)/obj.i386/libc_static.a" "$(SYMROOT)"; \
- fi
-build-profile: build-ppc-profile build-i386-profile
- @echo "Checking for libc_profile.a"
- @if [ -f "$(OBJROOT)/obj.ppc/libc_profile.a" -a -f "$(OBJROOT)/obj.i386/libc_profile.a" ]; then\
- lipo -create -arch ppc "$(OBJROOT)/obj.ppc/libc_profile.a" \
- -arch i386 "$(OBJROOT)/obj.i386/libc_profile.a" \
- -output $(SYMROOT)/libc_profile.a;\
- elif [ -f "$(OBJROOT)/obj.ppc/libc_profile.a" ]; then \
- cp -p "$(OBJROOT)/obj.ppc/libc_profile.a" "$(SYMROOT)"; \
- elif [ -f "$(OBJROOT)/obj.i386/libc_profile.a" ]; then \
- cp -p "$(OBJROOT)/obj.i386/libc_profile.a" "$(SYMROOT)"; \
- fi
-build-debug: build-ppc-debug build-i386-debug
- @echo "Checking for libc_debug.a"
- @if [ -f "$(OBJROOT)/obj.ppc/libc_debug.a" -a -f "$(OBJROOT)/obj.i386/libc_debug.a" ]; then\
- lipo -create -arch ppc "$(OBJROOT)/obj.ppc/libc_debug.a" \
- -arch i386 "$(OBJROOT)/obj.i386/libc_debug.a" \
- -output $(SYMROOT)/libc_debug.a;\
- elif [ -f "$(OBJROOT)/obj.ppc/libc_debug.a" ]; then \
- cp -p "$(OBJROOT)/obj.ppc/libc_debug.a" "$(SYMROOT)"; \
- elif [ -f "$(OBJROOT)/obj.i386/libc_debug.a" ]; then \
- cp -p "$(OBJROOT)/obj.i386/libc_debug.a" "$(SYMROOT)"; \
- fi
-build-dynamic: build-ppc-dynamic build-i386-dynamic
- @echo "Checking for libc.a"
- @if [ -f "$(OBJROOT)/obj.ppc/libc.a" -a -f "$(OBJROOT)/obj.i386/libc.a" ]; then\
- echo "Creating FAT libc.a"; \
- lipo -create -arch ppc "$(OBJROOT)/obj.ppc/libc.a" -arch i386 \
- "$(OBJROOT)/obj.i386/libc.a" -output $(SYMROOT)/libc.a;\
- elif [ -f "$(OBJROOT)/obj.ppc/libc.a" ]; then \
- echo "Using thin PPC libc.a" ;\
- cp -p "$(OBJROOT)/obj.ppc/libc.a" "$(SYMROOT)"; \
- elif [ -f "$(OBJROOT)/obj.i386/libc.a" ]; then \
- echo "Using thin i386 libc.a" ;\
- cp -p "$(OBJROOT)/obj.i386/libc.a" "$(SYMROOT)"; \
- fi
+build-static: autopatch build-ppc-static build-ppc64-static build-i386-static
+ @echo "Creating final libc_static.a"
+ifeq ($(words $(RC_ARCHS)),1)
+ cp -p "$(OBJROOT)/obj.$(RC_ARCHS)/libc_static.a" "$(SYMROOT)"
+else
+ lipo -create \
+ $(foreach A,$(RC_ARCHS),-arch $(A) "$(OBJROOT)/obj.$(A)/libc_static.a") \
+ -output $(SYMROOT)/libc_static.a
+endif
+build-profile: autopatch build-ppc-profile build-ppc64-profile build-i386-profile
+ @echo "Creating final libc_profile.a"
+ifeq ($(words $(RC_ARCHS)),1)
+ cp -p "$(OBJROOT)/obj.$(RC_ARCHS)/libc_profile.a" "$(SYMROOT)"
+else
+ lipo -create \
+ $(foreach A,$(RC_ARCHS),-arch $(A) "$(OBJROOT)/obj.$(A)/libc_profile.a") \
+ -output $(SYMROOT)/libc_profile.a
+endif
+build-debug: autopatch build-ppc-debug build-ppc64-debug build-i386-debug
+ @echo "Creating final libc_debug.a"
+ifeq ($(words $(RC_ARCHS)),1)
+ cp -p "$(OBJROOT)/obj.$(RC_ARCHS)/libc_debug.a" "$(SYMROOT)"
+else
+ lipo -create \
+ $(foreach A,$(RC_ARCHS),-arch $(A) "$(OBJROOT)/obj.$(A)/libc_debug.a") \
+ -output $(SYMROOT)/libc_debug.a
+endif
+build-dynamic: autopatch build-ppc-dynamic build-ppc64-dynamic build-i386-dynamic
+ @echo "Creating final libc.a"
+ifeq ($(words $(RC_ARCHS)),1)
+ cp -p "$(OBJROOT)/obj.$(RC_ARCHS)/libc.a" "$(SYMROOT)"
+else
+ lipo -create \
+ $(foreach A,$(RC_ARCHS),-arch $(A) "$(OBJROOT)/obj.$(A)/libc.a") \
+ -output $(SYMROOT)/libc.a
+endif