mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
modify Makefile so its possible to build a universal lib. Building is still complicated.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18002 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
df7d6d0e6e
commit
b5177cf200
1 changed files with 12 additions and 4 deletions
|
@ -27,6 +27,11 @@ ifeq ($(findstring MINGW,$(shell uname)),MINGW)
|
||||||
CC = gcc
|
CC = gcc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(findstring Darwin,$(shell uname)),Darwin)
|
||||||
|
ARCH_CMD = -arch $(ARCH)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
# This sets up 'SRC' based on the files mentioned in SOURCES
|
# This sets up 'SRC' based on the files mentioned in SOURCES
|
||||||
SRC := $(shell cat $(SPEEXSRC)/SOURCES | $(CC) $(CFLAGS) -E -P - | grep -v "^\#")
|
SRC := $(shell cat $(SPEEXSRC)/SOURCES | $(CC) $(CFLAGS) -E -P - | grep -v "^\#")
|
||||||
|
|
||||||
|
@ -53,7 +58,7 @@ $(DEPFILE): $(SOURCES)
|
||||||
done > $(DEPFILE); \
|
done > $(DEPFILE); \
|
||||||
echo "oo" > /dev/null )
|
echo "oo" > /dev/null )
|
||||||
|
|
||||||
librbspeex.a: $(OBJS) $(DEPFILE) rbspeex.o
|
librbspeex$(ARCH_CMD).a: $(OBJS) $(DEPFILE) rbspeex.o
|
||||||
@echo AR librbspeex.a
|
@echo AR librbspeex.a
|
||||||
$(SILENT)$(AR) ruv $@ $+ > /dev/null 2>&1
|
$(SILENT)$(AR) ruv $@ $+ > /dev/null 2>&1
|
||||||
|
|
||||||
|
@ -67,10 +72,13 @@ librbspeex.a: $(OBJS) $(DEPFILE) rbspeex.o
|
||||||
|
|
||||||
%.o:
|
%.o:
|
||||||
@echo CC $<
|
@echo CC $<
|
||||||
$(SILENT)$(CC) $(CFLAGS) -c $< -o $@
|
$(SILENT)$(CC) $(CFLAGS) -c $< -o $@ $(ARCH_CMD)
|
||||||
|
|
||||||
|
universal: librbspeexppc.a librbspeexi386.a
|
||||||
|
@echo lipo libusb.a
|
||||||
|
@(SILENT) lipo -create librbspeexppc.a librbspeexi386.a -output librbspeex.a
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(OBJS) libspeex.a librbspeex.a rbspeexenc.o ../rbspeexenc dep-speex
|
rm -f $(OBJS) rbspeex.o libspeex.a librbspeex.a rbspeexenc.o ../rbspeexenc dep-speex
|
||||||
|
|
||||||
-include $(DEPFILE)
|
-include $(DEPFILE)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue