Subversion Repositories Kolibri OS

Rev

Rev 4367 | Rev 4866 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1.  
  2. LIBRARY = pixman-1
  3.  
  4. CC = gcc
  5. CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -Wall -Winline -fomit-frame-pointer
  6.  
  7. LD = ld
  8. LDFLAGS = -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0 --out-implib lib$(LIBRARY).dll.a
  9.  
  10. STRIP = $(PREFIX)strip
  11.  
  12. INCLUDES= -I. -I../newlib/include
  13.  
  14. LIBPATH:= -L../../lib
  15.  
  16. LIBS:=  -ldll -lc.dll -lgcc
  17.  
  18. #DEFINES = -DHAVE_CONFIG_H -DPIXMAN_NO_TLS
  19. DEFINES = -DHAVE_CONFIG_H
  20.  
  21.  
  22. SOURCES =                               \
  23.         pixman.c                        \
  24.         pixman-access.c                 \
  25.         pixman-access-accessors.c       \
  26.         pixman-bits-image.c             \
  27.         pixman-combine32.c              \
  28.         pixman-combine-float.c          \
  29.         pixman-conical-gradient.c       \
  30.         pixman-edge.c                   \
  31.         pixman-edge-accessors.c         \
  32.         pixman-fast-path.c              \
  33.         pixman-filter.c                 \
  34.         pixman-general.c                \
  35.         pixman-glyph.c                  \
  36.         pixman-gradient-walker.c        \
  37.         pixman-image.c                  \
  38.         pixman-implementation.c         \
  39.         pixman-linear-gradient.c        \
  40.         pixman-matrix.c                 \
  41.         pixman-noop.c                   \
  42.         pixman-radial-gradient.c        \
  43.         pixman-region16.c               \
  44.         pixman-region32.c               \
  45.         pixman-solid-fill.c             \
  46.         pixman-timer.c                  \
  47.         pixman-trap.c                   \
  48.         pixman-utils.c                  \
  49.         pixman-x86.c                    \
  50.         pixman-mmx.c                    \
  51.         pixman-sse2.c                   \
  52.         $(NULL)
  53.  
  54. OBJECTS     = $(patsubst %.c, %.o, $(SOURCES))
  55.  
  56. ifeq ($(findstring ebox,$(MAKECMDGOALS)),ebox)
  57. CFLAGS+=-march=pentium-mmx
  58. endif
  59.  
  60. # targets
  61.  
  62. all:lib$(LIBRARY).a $(LIBRARY).dll
  63.  
  64. ebox:$lib(LIBRARY).a $(LIBRARY).dll
  65.  
  66. lib$(LIBRARY).a: $(OBJECTS) Makefile
  67.         ar cvrs lib$(LIBRARY).a $(OBJECTS)
  68.         mv -f lib$(LIBRARY).a ../../lib
  69.  
  70. $(LIBRARY).dll: $(LIBRARY).def $(OBJECTS) Makefile
  71.         $(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(LIBRARY).def $(OBJECTS) $(LIBS)
  72.         $(STRIP) $@
  73.         sed -f ../newlib/cmd1.sed $(LIBRARY).def > mem
  74.         sed -f ../newlib/cmd2.sed mem >$(LIBRARY).inc
  75.         mv -f $@ ../../bin
  76.         mv -f lib$(LIBRARY).dll.a ../../lib  
  77.        
  78.  
  79. %.o : %.c Makefile
  80.         $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
  81.  
  82. pixman-mmx.o: pixman-mmx.c Makefile
  83.         $(CC) $(CFLAGS) -mmmx $(DEFINES) $(INCLUDES) -o $@ $<
  84.  
  85. pixman-sse2.o: pixman-sse2.c Makefile
  86.         $(CC) $(CFLAGS) -msse2 $(DEFINES) $(INCLUDES) -o $@ $<
  87.  
  88.  
  89. clean:
  90.         -rm -f *.o
  91.