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 mkdir,$(OBJ)))
104 $(TARGET): $(SOURCES) $(RESOURCES) $(SYMBOLS) $(OBJECTS) | objdir
105 @$(call rm,$(OBJ)objects.lst)
106 @$(call touch,$(OBJ)objects.lst)
107 $(call addtolistfile,$(_OBJECTS),$(OBJ)objects.lst)
108 ifndef STATIC_LIBRARY_TARGET
109 $(CC) $(OFLAGS) @$(OBJ)objects.lst $(LIBS) -o $(TARGET) $(INSTALLNAME)
111 $(STRIP) $(STRIPOPT) $(TARGET)
115 $(AR) rcs $(TARGET) @$(OBJ)objects.lst $(LIBS)
117 $(AR) rcs $(TARGET) $(OBJECTS) $(LIBS)
120 ifdef SHARED_LIBRARY_TARGET
123 $(if $(basename $(VER)),ln -sf $(LP)$(MODULE)$(SO)$(VER) $(OBJ)$(LP)$(MODULE)$(SO)$(basename $(VER)),)
124 $(if $(VER),ln -sf $(LP)$(MODULE)$(SO)$(VER) $(OBJ)$(LP)$(MODULE)$(SO),)
136 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./png.c) -o $(call quote_path,$@)
138 $(OBJ)pngerror.o: ./pngerror.c
139 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngerror.c) -o $(call quote_path,$@)
141 $(OBJ)pngget.o: ./pngget.c
142 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngget.c) -o $(call quote_path,$@)
144 $(OBJ)pngmem.o: ./pngmem.c
145 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngmem.c) -o $(call quote_path,$@)
147 $(OBJ)pngpread.o: ./pngpread.c
148 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngpread.c) -o $(call quote_path,$@)
150 $(OBJ)pngread.o: ./pngread.c
151 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngread.c) -o $(call quote_path,$@)
153 $(OBJ)pngrio.o: ./pngrio.c
154 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngrio.c) -o $(call quote_path,$@)
156 $(OBJ)pngrtran.o: ./pngrtran.c
157 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngrtran.c) -o $(call quote_path,$@)
159 $(OBJ)pngrutil.o: ./pngrutil.c
160 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngrutil.c) -o $(call quote_path,$@)
162 $(OBJ)pngset.o: ./pngset.c
163 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngset.c) -o $(call quote_path,$@)
165 $(OBJ)pngtrans.o: ./pngtrans.c
166 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngtrans.c) -o $(call quote_path,$@)
168 $(OBJ)pngwio.o: ./pngwio.c
169 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngwio.c) -o $(call quote_path,$@)
171 $(OBJ)pngwrite.o: ./pngwrite.c
172 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngwrite.c) -o $(call quote_path,$@)
174 $(OBJ)pngwtran.o: ./pngwtran.c
175 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngwtran.c) -o $(call quote_path,$@)
177 $(OBJ)pngwutil.o: ./pngwutil.c
178 $(CC) $(CFLAGS) $(PRJ_CFLAGS) -c $(call quote_path,./pngwutil.c) -o $(call quote_path,$@)
181 $(call rm,$(OBJ)objects.lst)
183 ifdef SHARED_LIBRARY_TARGET
186 $(call rm,$(OBJ)$(LP)$(MODULE)$(SO)$(basename $(VER)))
187 $(call rm,$(OBJ)$(LP)$(MODULE)$(SO))
193 $(call rm,$(_OBJECTS))
195 realclean: cleantarget
199 $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
202 $(_CF_DIR)crossplatform.mk: ;
203 $(_CF_DIR)default.cf: ;