Subversion Repositories Kolibri OS

Rev

Rev 1897 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1.  
  2. LIBRARY= libpng
  3.  
  4. CC=gcc
  5. CPP=gcc -E
  6. AR= ar rc
  7.  
  8. CFLAGS = -c -O2 -fomit-frame-pointer
  9.  
  10. LDIMPORT:= -nostdlib --out-implib libpngimp.a --exclude-libs libamz.a
  11.  
  12. LDFLAGS:=  -shared -s -T../newlib/dll.lds -Map map --image-base 0
  13.  
  14. DEFS = -DHAVE_CONFIG_H -D__DYNAMIC_REENT__
  15.  
  16. LIBPNG_DEFINES = -DPNG_CONFIGURE_LIBPNG
  17.  
  18. DEFINES= $(DEFS) $(LIBPNG_DEFINES)
  19.  
  20. INCLUDES= -I../newlib/include -I../zlib
  21.  
  22. LIBPATH:= -L../newlib -L../zlib
  23.  
  24. LIBS:=  -lamz -lgcc -lzimp -lcimp
  25.  
  26. SOURCES = png.c pngerror.c pngget.c pngmem.c pngpread.c \
  27.           pngread.c pngrio.c pngrtran.c pngrutil.c      \
  28.           pngset.c pngtrans.c pngwio.c pngwrite.c       \
  29.           pngwtran.c pngwutil.c
  30.  
  31.  
  32.  
  33. OBJECTS =  $(patsubst %.c, %.o, $(SOURCES))
  34.  
  35.  
  36. # targets
  37.  
  38.  
  39. all:$(LIBRARY).a $(LIBRARY).dll
  40.  
  41.  
  42. $(LIBRARY).a: $(OBJECTS) Makefile
  43.         ar cvrs $(LIBRARY).a $(OBJECTS)
  44.  
  45. $(LIBRARY).dll: $(OBJECTS) Makefile
  46.         ld $(LDFLAGS) $(LDIMPORT) $(LIBPATH) -o $@ $(OBJECTS) $(LIBS)
  47.  
  48. %.o : %.c Makefile
  49.         $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
  50.  
  51.  
  52.  
  53.