1 .PHONY: all objdir cleantarget clean realclean distclean
12 TARGET_TYPE = staticlib
36 include $(_CF_DIR)crossplatform.mk
37 include $(_CF_DIR)default.cf
39 # POST-INCLUDES VARIABLES
41 OBJ = obj/$(CONFIG).$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/
45 TARGET = obj/$(CONFIG).$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/$(LP)png$(A)
85 LIBS += $(SHAREDLIB) $(EXECUTABLE) $(LINKOPT)
88 $(if $(DEBUG), -g, -O2 -ffast-math) $(FPIC) -w -DREPOSITORY_VERSION="\"$(REPOSITORY_VER)\"" \
92 ECFLAGS += -module $(MODULE)
93 CECFLAGS += -cpp $(_CPP)
100 $(if $(wildcard $(OBJ)),,$(call mkdirq,$(OBJ)))
104 $(TARGET): $(SOURCES) $(RESOURCES) $(SYMBOLS) $(OBJECTS) | objdir
105 @$(call rmq,$(OBJ)objects.lst)
106 @$(call touch,$(OBJ)objects.lst)
107 @$(call echo,$(_OBJECTS)) >> $(OBJ)objects.lst
108 ifndef STATIC_LIBRARY_TARGET
109 $(CC) $(OFLAGS) @$(OBJ)objects.lst $(LIBS) -o $(TARGET) $(INSTALLNAME)
111 $(STRIP) $(STRIPOPT) $(TARGET)
114 $(AR) rcs $(TARGET) @$(OBJ)objects.lst $(LIBS)
116 ifdef SHARED_LIBRARY_TARGET
119 $(if $(basename $(VER)),ln -sf $(LP)$(MODULE)$(SO)$(VER) $(OBJ)$(LP)$(MODULE)$(SO)$(basename $(VER)),)
120 $(if $(VER),ln -sf $(LP)$(MODULE)$(SO)$(VER) $(OBJ)$(LP)$(MODULE)$(SO),)
132 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./png.c) -o $(call quote_path,$@)
134 $(OBJ)pngerror.o: ./pngerror.c
135 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngerror.c) -o $(call quote_path,$@)
137 $(OBJ)pngget.o: ./pngget.c
138 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngget.c) -o $(call quote_path,$@)
140 $(OBJ)pngmem.o: ./pngmem.c
141 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngmem.c) -o $(call quote_path,$@)
143 $(OBJ)pngpread.o: ./pngpread.c
144 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngpread.c) -o $(call quote_path,$@)
146 $(OBJ)pngread.o: ./pngread.c
147 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngread.c) -o $(call quote_path,$@)
149 $(OBJ)pngrio.o: ./pngrio.c
150 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngrio.c) -o $(call quote_path,$@)
152 $(OBJ)pngrtran.o: ./pngrtran.c
153 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngrtran.c) -o $(call quote_path,$@)
155 $(OBJ)pngrutil.o: ./pngrutil.c
156 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngrutil.c) -o $(call quote_path,$@)
158 $(OBJ)pngset.o: ./pngset.c
159 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngset.c) -o $(call quote_path,$@)
161 $(OBJ)pngtrans.o: ./pngtrans.c
162 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngtrans.c) -o $(call quote_path,$@)
164 $(OBJ)pngwio.o: ./pngwio.c
165 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngwio.c) -o $(call quote_path,$@)
167 $(OBJ)pngwrite.o: ./pngwrite.c
168 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngwrite.c) -o $(call quote_path,$@)
170 $(OBJ)pngwtran.o: ./pngwtran.c
171 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngwtran.c) -o $(call quote_path,$@)
173 $(OBJ)pngwutil.o: ./pngwutil.c
174 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngwutil.c) -o $(call quote_path,$@)
177 $(call rmq,$(OBJ)objects.lst)
178 $(call rmq,$(TARGET))
179 ifdef SHARED_LIBRARY_TARGET
182 $(call rmq,$(OBJ)$(LP)$(MODULE)$(SO)$(basename $(VER)))
183 $(call rmq,$(OBJ)$(LP)$(MODULE)$(SO))
189 $(call rmq,$(_OBJECTS))
191 realclean: cleantarget
194 distclean: cleantarget