ef45e08844692ec73227e8663170deef909c1e79
[sdk] / deps / libpng-1.4.0 / Makefile
1 .PHONY: all objdir cleantarget clean realclean distclean
2
3 # CORE VARIABLES
4
5 MODULE := libpng
6 CONFIG := release
7 ifndef COMPILER
8 COMPILER := default
9 endif
10
11 TARGET_TYPE = staticlib
12
13 # FLAGS
14
15 ECFLAGS =
16 ifndef DEBIAN_PACKAGE
17 CFLAGS =
18 LDFLAGS =
19 endif
20 PRJ_CFLAGS =
21 CECFLAGS =
22 OFLAGS =
23 LIBS =
24
25 ifdef DEBUG
26 NOSTRIP := y
27 endif
28
29 CONSOLE = -mwindows
30
31 # INCLUDES
32
33 _CF_DIR = ../../
34
35 include $(_CF_DIR)crossplatform.mk
36 include $(_CF_DIR)default.cf
37
38 # POST-INCLUDES VARIABLES
39
40 OBJ = obj/$(CONFIG).$(PLATFORM)$(COMPILER_SUFFIX)/
41
42 RES = 
43
44 TARGET = obj/$(CONFIG).$(PLATFORM)$(COMPILER_SUFFIX)/$(LP)png$(A)
45
46 _OBJECTS = \
47         $(OBJ)png.o \
48         $(OBJ)pngerror.o \
49         $(OBJ)pngget.o \
50         $(OBJ)pngmem.o \
51         $(OBJ)pngpread.o \
52         $(OBJ)pngread.o \
53         $(OBJ)pngrio.o \
54         $(OBJ)pngrtran.o \
55         $(OBJ)pngrutil.o \
56         $(OBJ)pngset.o \
57         $(OBJ)pngtrans.o \
58         $(OBJ)pngwio.o \
59         $(OBJ)pngwrite.o \
60         $(OBJ)pngwtran.o \
61         $(OBJ)pngwutil.o
62
63 OBJECTS = $(_OBJECTS)
64
65 SOURCES = \
66         ./png.c \
67         ./pngerror.c \
68         ./pngget.c \
69         ./pngmem.c \
70         ./pngpread.c \
71         ./pngread.c \
72         ./pngrio.c \
73         ./pngrtran.c \
74         ./pngrutil.c \
75         ./pngset.c \
76         ./pngtrans.c \
77         ./pngwio.c \
78         ./pngwrite.c \
79         ./pngwtran.c \
80         ./pngwutil.c
81
82 RESOURCES =
83
84 LIBS += $(SHAREDLIB) $(EXECUTABLE) $(LINKOPT)
85
86 PRJ_CFLAGS += \
87          $(if $(DEBUG), -g, -O2 -ffast-math) $(FPIC) -w \
88                          -I. \
89                          -I../zlib
90
91
92
93
94
95 CECFLAGS += -cpp $(_CPP)
96
97 ifndef STATIC_LIBRARY_TARGET
98 OFLAGS +=
99 endif
100
101 # TARGETS
102
103 all: objdir $(TARGET)
104
105 objdir:
106         $(if $(wildcard $(OBJ)),,$(call mkdirq,$(OBJ)))
107
108 $(TARGET): $(SOURCES) $(RESOURCES) | objdir $(SYMBOLS) $(OBJECTS)
109         $(AR) rcs $(TARGET) $(OBJECTS) $(LIBS)
110
111 # SYMBOL RULES
112
113 # C OBJECT RULES
114
115 # OBJECT RULES
116
117 $(OBJ)png.o: ./png.c
118         $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c ./png.c -o $(OBJ)png.o
119
120 $(OBJ)pngerror.o: ./pngerror.c
121         $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c ./pngerror.c -o $(OBJ)pngerror.o
122
123 $(OBJ)pngget.o: ./pngget.c
124         $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c ./pngget.c -o $(OBJ)pngget.o
125
126 $(OBJ)pngmem.o: ./pngmem.c
127         $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c ./pngmem.c -o $(OBJ)pngmem.o
128
129 $(OBJ)pngpread.o: ./pngpread.c
130         $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c ./pngpread.c -o $(OBJ)pngpread.o
131
132 $(OBJ)pngread.o: ./pngread.c
133         $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c ./pngread.c -o $(OBJ)pngread.o
134
135 $(OBJ)pngrio.o: ./pngrio.c
136         $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c ./pngrio.c -o $(OBJ)pngrio.o
137
138 $(OBJ)pngrtran.o: ./pngrtran.c
139         $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c ./pngrtran.c -o $(OBJ)pngrtran.o
140
141 $(OBJ)pngrutil.o: ./pngrutil.c
142         $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c ./pngrutil.c -o $(OBJ)pngrutil.o
143
144 $(OBJ)pngset.o: ./pngset.c
145         $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c ./pngset.c -o $(OBJ)pngset.o
146
147 $(OBJ)pngtrans.o: ./pngtrans.c
148         $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c ./pngtrans.c -o $(OBJ)pngtrans.o
149
150 $(OBJ)pngwio.o: ./pngwio.c
151         $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c ./pngwio.c -o $(OBJ)pngwio.o
152
153 $(OBJ)pngwrite.o: ./pngwrite.c
154         $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c ./pngwrite.c -o $(OBJ)pngwrite.o
155
156 $(OBJ)pngwtran.o: ./pngwtran.c
157         $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c ./pngwtran.c -o $(OBJ)pngwtran.o
158
159 $(OBJ)pngwutil.o: ./pngwutil.c
160         $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c ./pngwutil.c -o $(OBJ)pngwutil.o
161
162 cleantarget: objdir
163         $(call rmq,$(TARGET))
164
165 clean: cleantarget
166         $(call rmq,$(_OBJECTS))
167
168 realclean: cleantarget
169         $(call rmrq,$(OBJ))
170
171 distclean: cleantarget
172         $(call rmrq,obj/)