Debian Codegraph @

third_party/minizip/Makefile

raw
1 ###############################################################################
2 #
3 # Simplied Makefile to build the minizip objects for the libxlsxwriter library.
4 #
5
6 # Keep the output quiet by default.
7 Q=@
8 ifdef V
9 Q=
10 endif
11
12 UNAME := $(shell uname -sr)
13
14 # Check for MinGW/MinGW64/Cygwin environments.
15 ifneq (,$(findstring MINGW, $(UNAME)))
16 MING_LIKE = y
17 endif
18 ifneq (,$(findstring MSYS, $(UNAME)))
19 MING_LIKE = y
20 endif
21 ifneq (,$(findstring CYGWIN, $(UNAME)))
22 MING_LIKE = y
23 endif
24
25 FPIC = -fPIC
26 CFLAGS += -O3 -DNOCRYPT -DNOUNCRYPT
27
28 # Change make options on MinGW/MinGW64/Cygwin.
29 ifdef MING_LIKE
30 FPIC =
31 CC = gcc
32 CFLAGS += -DUSE_FILE32API
33 endif
34
35 all: ioapi.o zip.o ioapi.so zip.so
36
37 %.o : %.c
38 $(Q)$(CC) -c $(CFLAGS) $(TARGET_ARCH) $<
39
40 %.so : %.c
41 $(Q)$(CC) $(FPIC) -c $(CFLAGS) $(TARGET_ARCH) $< -o $@
42
43 clean:
44 $(Q)/bin/rm -f *.o *.so