ide/Makefiles: Updated tarball makefiles to use FORCE_32BIT; Disabled forcing -m32...
[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 ifndef DEBIAN_PACKAGE
59 CFLAGS =
60 endif
61 OFLAGS =
62
63 # CROSS-PLATFORM MAGIC
64
65 include ../../crossplatform.mk
66 include ../../include.mk
67
68 # FLAGS
69
70 CFLAGS += -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w \
71          -I. \
72          -I../zlib
73
74 LIBS = $(SHAREDLIB) $(EXECUTABLE) $(LINKOPT)
75
76 UPXFLAGS = -9 -q
77
78 # HARD CODED PLATFORM-SPECIFIC OPTIONS
79 ifdef LINUX_TARGET
80 OFLAGS += -Wl,--no-undefined
81 endif
82
83 # TARGETS
84
85 all: objdir $(TARGET)
86
87 objdir:
88         $(if $(wildcard $(OBJ)),,$(call mkdirq,$(OBJ)))
89
90 $(TARGET): $(SOURCES) $(RESOURCES) | objdir $(SYMBOLS) $(OBJECTS)
91         $(AR) rcs $(TARGET) $(OBJECTS) $(LIBS)
92
93 # SYMBOL RULES
94
95 # C OBJECT RULES
96
97 # OBJECT RULES
98
99 $(OBJ)png.o: ./png.c
100         $(CC) $(CFLAGS) -c ./png.c -o $(OBJ)png.o
101
102 $(OBJ)pngerror.o: ./pngerror.c
103         $(CC) $(CFLAGS) -c ./pngerror.c -o $(OBJ)pngerror.o
104
105 $(OBJ)pngget.o: ./pngget.c
106         $(CC) $(CFLAGS) -c ./pngget.c -o $(OBJ)pngget.o
107
108 $(OBJ)pngmem.o: ./pngmem.c
109         $(CC) $(CFLAGS) -c ./pngmem.c -o $(OBJ)pngmem.o
110
111 $(OBJ)pngpread.o: ./pngpread.c
112         $(CC) $(CFLAGS) -c ./pngpread.c -o $(OBJ)pngpread.o
113
114 $(OBJ)pngread.o: ./pngread.c
115         $(CC) $(CFLAGS) -c ./pngread.c -o $(OBJ)pngread.o
116
117 $(OBJ)pngrio.o: ./pngrio.c
118         $(CC) $(CFLAGS) -c ./pngrio.c -o $(OBJ)pngrio.o
119
120 $(OBJ)pngrtran.o: ./pngrtran.c
121         $(CC) $(CFLAGS) -c ./pngrtran.c -o $(OBJ)pngrtran.o
122
123 $(OBJ)pngrutil.o: ./pngrutil.c
124         $(CC) $(CFLAGS) -c ./pngrutil.c -o $(OBJ)pngrutil.o
125
126 $(OBJ)pngset.o: ./pngset.c
127         $(CC) $(CFLAGS) -c ./pngset.c -o $(OBJ)pngset.o
128
129 $(OBJ)pngtrans.o: ./pngtrans.c
130         $(CC) $(CFLAGS) -c ./pngtrans.c -o $(OBJ)pngtrans.o
131
132 $(OBJ)pngwio.o: ./pngwio.c
133         $(CC) $(CFLAGS) -c ./pngwio.c -o $(OBJ)pngwio.o
134
135 $(OBJ)pngwrite.o: ./pngwrite.c
136         $(CC) $(CFLAGS) -c ./pngwrite.c -o $(OBJ)pngwrite.o
137
138 $(OBJ)pngwtran.o: ./pngwtran.c
139         $(CC) $(CFLAGS) -c ./pngwtran.c -o $(OBJ)pngwtran.o
140
141 $(OBJ)pngwutil.o: ./pngwutil.c
142         $(CC) $(CFLAGS) -c ./pngwutil.c -o $(OBJ)pngwutil.o
143
144 clean: objdir
145         $(call rmq,$(TARGET))
146         $(call rmq,$(OBJECTS))
147         $(call rmq,$(COBJECTS))
148
149 realclean:
150         $(call rmrq,$(OBJ))
151
152 distclean:
153         $(call rmrq,obj/)