174c20df875b2c5e067012c1035a1332b90410dc
[sdk] / deps / libpng-1.4.0 / Makefile
1 .PHONY: all objdir 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 endif
19 CECFLAGS =
20 OFLAGS =
21 LDFLAGS =
22 LIBS =
23
24 ifdef DEBUG
25 NOSTRIP := y
26 endif
27
28 CONSOLE = -mwindows
29
30 # INCLUDES
31
32 _CF_DIR = ../../
33
34 include $(_CF_DIR)crossplatform.mk
35 include $(_CF_DIR)include.mk
36
37 # POST-INCLUDES VARIABLES
38
39 OBJ = obj/$(CONFIG).$(PLATFORM)/
40
41 RES = 
42
43 TARGET = obj/$(CONFIG).$(PLATFORM)/$(LP)png$(A)
44
45 _OBJECTS = \
46         $(OBJ)png.o \
47         $(OBJ)pngerror.o \
48         $(OBJ)pngget.o \
49         $(OBJ)pngmem.o \
50         $(OBJ)pngpread.o \
51         $(OBJ)pngread.o \
52         $(OBJ)pngrio.o \
53         $(OBJ)pngrtran.o \
54         $(OBJ)pngrutil.o \
55         $(OBJ)pngset.o \
56         $(OBJ)pngtrans.o \
57         $(OBJ)pngwio.o \
58         $(OBJ)pngwrite.o \
59         $(OBJ)pngwtran.o \
60         $(OBJ)pngwutil.o
61
62 OBJECTS = $(_OBJECTS)
63
64 SOURCES = $(ECSOURCES) \
65         ./png.c \
66         ./pngerror.c \
67         ./pngget.c \
68         ./pngmem.c \
69         ./pngpread.c \
70         ./pngread.c \
71         ./pngrio.c \
72         ./pngrtran.c \
73         ./pngrutil.c \
74         ./pngset.c \
75         ./pngtrans.c \
76         ./pngwio.c \
77         ./pngwrite.c \
78         ./pngwtran.c \
79         ./pngwutil.c
80
81 RESOURCES =
82
83 LIBS += $(SHAREDLIB) $(EXECUTABLE) $(LINKOPT)
84
85 CFLAGS += \
86          $(if $(DEBIAN_PACKAGE),$(CPPFLAGS),) $(if $(DEBUG), -D_DEBUG,) \
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 OFLAGS += $(LDFLAGS)
100 endif
101
102 # TARGETS
103
104 all: objdir $(TARGET)
105
106 objdir:
107         $(if $(wildcard $(OBJ)),,$(call mkdirq,$(OBJ)))
108
109 $(TARGET): $(SOURCES) $(RESOURCES) | objdir $(SYMBOLS) $(OBJECTS)
110         $(AR) rcs $(TARGET) $(OBJECTS) $(LIBS)
111
112 # SYMBOL RULES
113
114 # C OBJECT RULES
115
116 # OBJECT RULES
117
118 $(OBJ)png.o: ./png.c
119         $(CC) $(CFLAGS) -c ./png.c -o $(OBJ)png.o
120
121 $(OBJ)pngerror.o: ./pngerror.c
122         $(CC) $(CFLAGS) -c ./pngerror.c -o $(OBJ)pngerror.o
123
124 $(OBJ)pngget.o: ./pngget.c
125         $(CC) $(CFLAGS) -c ./pngget.c -o $(OBJ)pngget.o
126
127 $(OBJ)pngmem.o: ./pngmem.c
128         $(CC) $(CFLAGS) -c ./pngmem.c -o $(OBJ)pngmem.o
129
130 $(OBJ)pngpread.o: ./pngpread.c
131         $(CC) $(CFLAGS) -c ./pngpread.c -o $(OBJ)pngpread.o
132
133 $(OBJ)pngread.o: ./pngread.c
134         $(CC) $(CFLAGS) -c ./pngread.c -o $(OBJ)pngread.o
135
136 $(OBJ)pngrio.o: ./pngrio.c
137         $(CC) $(CFLAGS) -c ./pngrio.c -o $(OBJ)pngrio.o
138
139 $(OBJ)pngrtran.o: ./pngrtran.c
140         $(CC) $(CFLAGS) -c ./pngrtran.c -o $(OBJ)pngrtran.o
141
142 $(OBJ)pngrutil.o: ./pngrutil.c
143         $(CC) $(CFLAGS) -c ./pngrutil.c -o $(OBJ)pngrutil.o
144
145 $(OBJ)pngset.o: ./pngset.c
146         $(CC) $(CFLAGS) -c ./pngset.c -o $(OBJ)pngset.o
147
148 $(OBJ)pngtrans.o: ./pngtrans.c
149         $(CC) $(CFLAGS) -c ./pngtrans.c -o $(OBJ)pngtrans.o
150
151 $(OBJ)pngwio.o: ./pngwio.c
152         $(CC) $(CFLAGS) -c ./pngwio.c -o $(OBJ)pngwio.o
153
154 $(OBJ)pngwrite.o: ./pngwrite.c
155         $(CC) $(CFLAGS) -c ./pngwrite.c -o $(OBJ)pngwrite.o
156
157 $(OBJ)pngwtran.o: ./pngwtran.c
158         $(CC) $(CFLAGS) -c ./pngwtran.c -o $(OBJ)pngwtran.o
159
160 $(OBJ)pngwutil.o: ./pngwutil.c
161         $(CC) $(CFLAGS) -c ./pngwutil.c -o $(OBJ)pngwutil.o
162
163 clean: objdir
164         $(call rmq,$(TARGET))
165         $(call rmq,$(_OBJECTS))
166
167 realclean: clean
168         $(call rmrq,$(OBJ))
169
170 distclean:
171         $(call rmrq,obj/)