makefiles: single file per line for all file lists in all makefiles.
[sdk] / deps / libpng-1.4.0 / Makefile
1 .PHONY: all objdir clean realclean distclean
2
3 # CONTENT
4
5 MODULE := libpng
6 CONFIG := release
7 COMPILER := default
8 TARGET_TYPE = staticlib
9
10 OBJ = obj/$(CONFIG).$(PLATFORM)/
11
12 RES = 
13
14 TARGET = obj/$(CONFIG).$(PLATFORM)/$(LP)png$(A)
15
16 OBJECTS = \
17         $(OBJ)png.o \
18         $(OBJ)pngerror.o \
19         $(OBJ)pngget.o \
20         $(OBJ)pngmem.o \
21         $(OBJ)pngpread.o \
22         $(OBJ)pngread.o \
23         $(OBJ)pngrio.o \
24         $(OBJ)pngrtran.o \
25         $(OBJ)pngrutil.o \
26         $(OBJ)pngset.o \
27         $(OBJ)pngtrans.o \
28         $(OBJ)pngwio.o \
29         $(OBJ)pngwrite.o \
30         $(OBJ)pngwtran.o \
31         $(OBJ)pngwutil.o
32
33 COBJECTS =
34
35 SYMBOLS =
36
37 IMPORTS =
38
39 SOURCES = \
40         ./png.c \
41         ./pngerror.c \
42         ./pngget.c \
43         ./pngmem.c \
44         ./pngpread.c \
45         ./pngread.c \
46         ./pngrio.c \
47         ./pngrtran.c \
48         ./pngrutil.c \
49         ./pngset.c \
50         ./pngtrans.c \
51         ./pngwio.c \
52         ./pngwrite.c \
53         ./pngwtran.c \
54         ./pngwutil.c
55
56 RESOURCES =
57
58 # CROSS-PLATFORM MAGIC
59
60 include ../../include.mk
61
62 # FLAGS
63
64 CFLAGS = -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w \
65          -I. \
66          -I../zlib
67
68 LIBS = $(SHAREDLIB) $(EXECUTABLE) $(LINKOPT)
69
70 UPXFLAGS = -9 -q
71
72 # HARD CODED PLATFORM-SPECIFIC OPTIONS
73 ifdef LINUX
74 OFLAGS += -Wl,--no-undefined
75 endif
76
77 # TARGETS
78
79 all: objdir $(TARGET)
80
81 objdir:
82         $(if $(wildcard $(OBJ)),,$(call mkdirq,$(OBJ)))
83
84 $(TARGET): $(SOURCES) $(RESOURCES) | objdir $(SYMBOLS) $(OBJECTS)
85         $(AR) rcs $(TARGET) $(OBJECTS) $(LIBS)
86
87 # SYMBOL RULES
88
89 # C OBJECT RULES
90
91 # OBJECT RULES
92
93 $(OBJ)png.o: ./png.c
94         $(CC) $(CFLAGS) -c ./png.c -o $(OBJ)png.o
95
96 $(OBJ)pngerror.o: ./pngerror.c
97         $(CC) $(CFLAGS) -c ./pngerror.c -o $(OBJ)pngerror.o
98
99 $(OBJ)pngget.o: ./pngget.c
100         $(CC) $(CFLAGS) -c ./pngget.c -o $(OBJ)pngget.o
101
102 $(OBJ)pngmem.o: ./pngmem.c
103         $(CC) $(CFLAGS) -c ./pngmem.c -o $(OBJ)pngmem.o
104
105 $(OBJ)pngpread.o: ./pngpread.c
106         $(CC) $(CFLAGS) -c ./pngpread.c -o $(OBJ)pngpread.o
107
108 $(OBJ)pngread.o: ./pngread.c
109         $(CC) $(CFLAGS) -c ./pngread.c -o $(OBJ)pngread.o
110
111 $(OBJ)pngrio.o: ./pngrio.c
112         $(CC) $(CFLAGS) -c ./pngrio.c -o $(OBJ)pngrio.o
113
114 $(OBJ)pngrtran.o: ./pngrtran.c
115         $(CC) $(CFLAGS) -c ./pngrtran.c -o $(OBJ)pngrtran.o
116
117 $(OBJ)pngrutil.o: ./pngrutil.c
118         $(CC) $(CFLAGS) -c ./pngrutil.c -o $(OBJ)pngrutil.o
119
120 $(OBJ)pngset.o: ./pngset.c
121         $(CC) $(CFLAGS) -c ./pngset.c -o $(OBJ)pngset.o
122
123 $(OBJ)pngtrans.o: ./pngtrans.c
124         $(CC) $(CFLAGS) -c ./pngtrans.c -o $(OBJ)pngtrans.o
125
126 $(OBJ)pngwio.o: ./pngwio.c
127         $(CC) $(CFLAGS) -c ./pngwio.c -o $(OBJ)pngwio.o
128
129 $(OBJ)pngwrite.o: ./pngwrite.c
130         $(CC) $(CFLAGS) -c ./pngwrite.c -o $(OBJ)pngwrite.o
131
132 $(OBJ)pngwtran.o: ./pngwtran.c
133         $(CC) $(CFLAGS) -c ./pngwtran.c -o $(OBJ)pngwtran.o
134
135 $(OBJ)pngwutil.o: ./pngwutil.c
136         $(CC) $(CFLAGS) -c ./pngwutil.c -o $(OBJ)pngwutil.o
137
138 clean: objdir
139         $(call rmq,$(TARGET))
140         $(call rmq,$(OBJECTS))
141         $(call rmq,$(COBJECTS))
142
143 realclean:
144         $(call rmrq,$(OBJ))
145
146 distclean:
147         $(call rmrq,obj/)