Subversion Repositories Kolibri OS

Rev

Rev 1898 | 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
  11.  
  12. LDFLAGS:=  -shared -s -T../newlib/dll.lds --image-base 0
  13.  
  14. DEFS = -DHAVE_CONFIG_H
  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. OBJECTS =  $(patsubst %.c, %.o, $(SOURCES))
  33.  
  34.  
  35. # targets
  36.  
  37.  
  38. all:$(LIBRARY).a $(LIBRARY).dll
  39.  
  40.  
  41. $(LIBRARY).a: $(OBJECTS) Makefile
  42.         ar cvrs $(LIBRARY).a $(OBJECTS)
  43.  
  44. $(LIBRARY).dll: $(OBJECTS) Makefile
  45.         ld $(LDFLAGS) $(LDIMPORT) $(LIBPATH) -o $@ $(OBJECTS) $(LIBS) symbols.def
  46.  
  47. %.o : %.c Makefile
  48.         $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
  49.  
  50. clean:
  51.         -rm -f *.o
  52.  
  53.  
  54.  
  55.  
  56.