mirror of
https://github.com/jmcnamara/libxlsxwriter
synced 2025-03-28 21:13:14 +00:00
parent
110af3ff4d
commit
ff35a56934
15
Makefile
15
Makefile
@ -32,6 +32,21 @@ ifndef USE_NO_MD5
|
||||
endif
|
||||
$(Q)$(MAKE) -C src
|
||||
|
||||
universal_binary :
|
||||
$(Q)$(MAKE) clean
|
||||
$(Q)TARGET_ARCH="-target x86_64-apple-macos10.12" $(MAKE) all
|
||||
$(Q)mv lib/libxlsxwriter.a libxlsxwriter_x86_64.a
|
||||
$(Q)mv lib/libxlsxwriter.dylib libxlsxwriter_x86_64.dylib
|
||||
|
||||
$(Q)$(MAKE) clean
|
||||
$(Q)TARGET_ARCH="-target arm64-apple-macos11" $(MAKE) all
|
||||
$(Q)mv lib/libxlsxwriter.a lib/libxlsxwriter_arm64.a
|
||||
$(Q)mv lib/libxlsxwriter.dylib lib/libxlsxwriter_arm64.dylib
|
||||
$(Q)mv libxlsxwriter_x86_64.a libxlsxwriter_x86_64.dylib lib
|
||||
|
||||
$(Q)lipo -create -output lib/libxlsxwriter.a lib/libxlsxwriter_x86_64.a lib/libxlsxwriter_arm64.a
|
||||
$(Q)lipo -create -output lib/libxlsxwriter.dylib lib/libxlsxwriter_x86_64.dylib lib/libxlsxwriter_arm64.dylib
|
||||
|
||||
# Build the example programs.
|
||||
examples :
|
||||
$(Q)$(MAKE) -C examples
|
||||
|
@ -148,7 +148,7 @@ ARCH = -m32
|
||||
endif
|
||||
|
||||
$(LIBXLSXWRITER_SO) : $(SOBJS)
|
||||
$(Q)$(CC) $(LDFLAGS) $(SOFLAGS) $(ARCH) -o $@ $(MINIZIP_SO) $(TMPFILEPLUS_SO) $(MD5_SO) $^ $(LIBS)
|
||||
$(Q)$(CC) $(LDFLAGS) $(SOFLAGS) $(ARCH) $(TARGET_ARCH) -o $@ $(MINIZIP_SO) $(TMPFILEPLUS_SO) $(MD5_SO) $^ $(LIBS)
|
||||
|
||||
# The test library.
|
||||
$(LIBXLSXWRITER_TO) : $(TOBJS)
|
||||
@ -159,10 +159,10 @@ test_compile : $(OBJS)
|
||||
|
||||
# Targets for the object files.
|
||||
%.o : %.c $(HDRS)
|
||||
$(Q)$(CC) -I$(INC_DIR) $(CFLAGS) $(CXXFLAGS) -c $<
|
||||
$(Q)$(CC) -I$(INC_DIR) $(CFLAGS) $(CXXFLAGS) $(TARGET_ARCH) -c $<
|
||||
|
||||
%.so : %.c $(HDRS)
|
||||
$(Q)$(CC) $(FPIC) -I$(INC_DIR) $(LDFLAGS) $(CFLAGS) $(CXXFLAGS) -c $< -o $@
|
||||
$(Q)$(CC) $(FPIC) -I$(INC_DIR) $(LDFLAGS) $(CFLAGS) $(CXXFLAGS) $(TARGET_ARCH) -c $< -o $@
|
||||
|
||||
%.to : %.c $(HDRS)
|
||||
$(Q)$(CC) -g -O3 -DTESTING -I$(INC_DIR) $(CFLAGS) $(CXXFLAGS) -c $< -o $@
|
||||
|
4
third_party/md5/Makefile
vendored
4
third_party/md5/Makefile
vendored
@ -33,10 +33,10 @@ endif
|
||||
all: md5.o md5.so
|
||||
|
||||
%.o : %.c
|
||||
$(Q)$(CC) -c $(CFLAGS) $<
|
||||
$(Q)$(CC) -c $(CFLAGS) $(TARGET_ARCH) $<
|
||||
|
||||
%.so : %.c
|
||||
$(Q)$(CC) $(FPIC) -c $(CFLAGS) $< -o $@
|
||||
$(Q)$(CC) $(FPIC) -c $(CFLAGS) $(TARGET_ARCH) $< -o $@
|
||||
|
||||
clean:
|
||||
$(Q)/bin/rm -f *.o *.so
|
||||
|
4
third_party/minizip/Makefile
vendored
4
third_party/minizip/Makefile
vendored
@ -40,10 +40,10 @@ endif
|
||||
all: ioapi.o zip.o ioapi.so zip.so
|
||||
|
||||
%.o : %.c
|
||||
$(Q)$(CC) -c $(CFLAGS) $<
|
||||
$(Q)$(CC) -c $(CFLAGS) $(TARGET_ARCH) $<
|
||||
|
||||
%.so : %.c
|
||||
$(Q)$(CC) $(FPIC) -c $(CFLAGS) $< -o $@
|
||||
$(Q)$(CC) $(FPIC) -c $(CFLAGS) $(TARGET_ARCH) $< -o $@
|
||||
|
||||
clean:
|
||||
$(Q)/bin/rm -f *.o *.so
|
||||
|
4
third_party/tmpfileplus/Makefile
vendored
4
third_party/tmpfileplus/Makefile
vendored
@ -33,10 +33,10 @@ endif
|
||||
all: tmpfileplus.o tmpfileplus.so
|
||||
|
||||
%.o : %.c
|
||||
$(Q)$(CC) -c $(CFLAGS) $<
|
||||
$(Q)$(CC) -c $(CFLAGS) $(TARGET_ARCH) $<
|
||||
|
||||
%.so : %.c
|
||||
$(Q)$(CC) $(FPIC) -c $(CFLAGS) $< -o $@
|
||||
$(Q)$(CC) $(FPIC) -c $(CFLAGS) $(TARGET_ARCH) $< -o $@
|
||||
|
||||
clean:
|
||||
$(Q)/bin/rm -f *.o *.so
|
||||
|
Loading…
x
Reference in New Issue
Block a user