2013-12-15 09:09:20 +01:00
|
|
|
LIBRARY = cairo2
|
|
|
|
|
2014-04-21 19:06:44 +02:00
|
|
|
CC = kos32-gcc
|
|
|
|
AR = kos32-ar
|
|
|
|
LD = kos32-ld
|
|
|
|
STRIP = kos32-strip
|
|
|
|
|
2013-12-15 09:09:20 +01:00
|
|
|
CFLAGS = -c -O2 -ffast-math -Wall -Winline -Wno-attributes -fomit-frame-pointer
|
|
|
|
|
2014-04-21 19:06:44 +02:00
|
|
|
LDFLAGS = -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0 --version-script cairo.ver --output-def $(LIBRARY).orig.def
|
|
|
|
LDFLAGS+= --out-implib lib$(LIBRARY).dll.a
|
2013-12-15 09:09:20 +01:00
|
|
|
|
2014-04-21 19:06:44 +02:00
|
|
|
ARFLAGS = crs
|
2013-12-15 09:09:20 +01:00
|
|
|
|
|
|
|
DEFINES = -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -U_MSC_VER -DHAVE_CONFIG_H=1 -DCAIRO_NO_MUTEX=1
|
|
|
|
|
|
|
|
INCLUDES = -I. -I../newlib/include -I../pixman -I../zlib -I../libpng -I../freetype/include
|
|
|
|
|
2014-04-21 19:06:44 +02:00
|
|
|
LIBPATH:= -L../../lib -L/home/autobuild/tools/win32/mingw32/lib
|
2013-12-15 09:09:20 +01:00
|
|
|
|
|
|
|
LIBS:= -ldll -lgcc -lfreetype.dll -lz.dll -lpixman-1.dll -lpng16.dll -lc.dll
|
|
|
|
|
|
|
|
CAIRO_SOURCES = \
|
|
|
|
cairo.c \
|
|
|
|
cairo-analysis-surface.c \
|
|
|
|
cairo-arc.c \
|
|
|
|
cairo-array.c \
|
|
|
|
cairo-atomic.c \
|
|
|
|
cairo-base64-stream.c \
|
|
|
|
cairo-base85-stream.c \
|
|
|
|
cairo-bentley-ottmann.c \
|
|
|
|
cairo-bentley-ottmann-rectangular.c \
|
|
|
|
cairo-bentley-ottmann-rectilinear.c \
|
|
|
|
cairo-botor-scan-converter.c \
|
|
|
|
cairo-boxes.c \
|
|
|
|
cairo-boxes-intersect.c \
|
|
|
|
cairo-cache.c \
|
|
|
|
cairo-cff-subset.c \
|
|
|
|
cairo-clip.c \
|
|
|
|
cairo-clip-boxes.c \
|
|
|
|
cairo-clip-polygon.c \
|
|
|
|
cairo-clip-region.c \
|
|
|
|
cairo-clip-surface.c \
|
|
|
|
cairo-clip-tor-scan-converter.c \
|
|
|
|
cairo-color.c \
|
|
|
|
cairo-composite-rectangles.c \
|
|
|
|
cairo-compositor.c \
|
|
|
|
cairo-contour.c \
|
|
|
|
cairo-damage.c \
|
|
|
|
cairo-debug.c \
|
|
|
|
cairo-default-context.c \
|
|
|
|
cairo-deflate-stream.c \
|
|
|
|
cairo-device.c \
|
|
|
|
cairo-error.c \
|
|
|
|
cairo-fallback-compositor.c \
|
|
|
|
cairo-fixed.c \
|
|
|
|
cairo-font-face.c \
|
|
|
|
cairo-font-face-twin.c \
|
|
|
|
cairo-font-face-twin-data.c \
|
|
|
|
cairo-font-options.c \
|
|
|
|
cairo-freed-pool.c \
|
|
|
|
cairo-freelist.c \
|
|
|
|
cairo-ft-font.c \
|
|
|
|
cairo-gstate.c \
|
|
|
|
cairo-hash.c \
|
|
|
|
cairo-hull.c \
|
|
|
|
cairo-image-compositor.c \
|
|
|
|
cairo-image-info.c \
|
|
|
|
cairo-image-source.c \
|
|
|
|
cairo-image-surface.c \
|
|
|
|
cairo-lzw.c \
|
|
|
|
cairo-mask-compositor.c \
|
|
|
|
cairo-matrix.c \
|
|
|
|
cairo-mempool.c \
|
|
|
|
cairo-mesh-pattern-rasterizer.c \
|
|
|
|
cairo-misc.c \
|
|
|
|
cairo-mono-scan-converter.c \
|
|
|
|
cairo-mutex.c \
|
|
|
|
cairo-no-compositor.c \
|
|
|
|
cairo-observer.c \
|
|
|
|
cairo-output-stream.c \
|
|
|
|
cairo-paginated-surface.c \
|
|
|
|
cairo-path.c \
|
|
|
|
cairo-path-bounds.c \
|
|
|
|
cairo-path-fill.c \
|
|
|
|
cairo-path-fixed.c \
|
|
|
|
cairo-path-in-fill.c \
|
|
|
|
cairo-path-stroke.c \
|
|
|
|
cairo-path-stroke-boxes.c \
|
|
|
|
cairo-path-stroke-polygon.c \
|
|
|
|
cairo-path-stroke-traps.c \
|
|
|
|
cairo-path-stroke-tristrip.c \
|
|
|
|
cairo-pattern.c \
|
|
|
|
cairo-pdf-operators.c \
|
|
|
|
cairo-pdf-shading.c \
|
|
|
|
cairo-pen.c \
|
|
|
|
cairo-png.c \
|
|
|
|
cairo-polygon.c \
|
|
|
|
cairo-polygon-intersect.c \
|
|
|
|
cairo-polygon-reduce.c \
|
|
|
|
cairo-raster-source-pattern.c \
|
|
|
|
cairo-recording-surface.c \
|
|
|
|
cairo-rectangle.c \
|
|
|
|
cairo-rectangular-scan-converter.c \
|
|
|
|
cairo-region.c \
|
|
|
|
cairo-rtree.c \
|
|
|
|
cairo-scaled-font.c \
|
|
|
|
cairo-scaled-font-subsets.c \
|
|
|
|
cairo-script-surface.c \
|
|
|
|
cairo-shape-mask-compositor.c \
|
|
|
|
cairo-slope.c \
|
|
|
|
cairo-spans.c \
|
|
|
|
cairo-spans-compositor.c \
|
|
|
|
cairo-spline.c \
|
|
|
|
cairo-stroke-dash.c \
|
|
|
|
cairo-stroke-style.c \
|
|
|
|
cairo-surface.c \
|
|
|
|
cairo-surface-clipper.c \
|
|
|
|
cairo-surface-fallback.c \
|
|
|
|
cairo-surface-offset.c \
|
|
|
|
cairo-surface-snapshot.c \
|
|
|
|
cairo-surface-subsurface.c \
|
|
|
|
cairo-surface-wrapper.c \
|
|
|
|
cairo-svg-surface.c \
|
|
|
|
cairo-tor22-scan-converter.c \
|
|
|
|
cairo-tor-scan-converter.c \
|
|
|
|
cairo-toy-font-face.c \
|
|
|
|
cairo-traps.c \
|
|
|
|
cairo-traps-compositor.c \
|
|
|
|
cairo-tristrip.c \
|
|
|
|
cairo-truetype-subset.c \
|
|
|
|
cairo-type1-fallback.c \
|
|
|
|
cairo-type1-glyph-names.c \
|
|
|
|
cairo-type1-subset.c \
|
|
|
|
cairo-type3-glyph-surface.c \
|
|
|
|
cairo-unicode.c \
|
|
|
|
cairo-user-font.c \
|
|
|
|
cairo-version.c \
|
|
|
|
cairo-wideint.c \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
|
|
|
|
SOURCES= $(CAIRO_SOURCES)
|
|
|
|
|
|
|
|
OBJECTS = $(patsubst %.c, src/%.o, $(SOURCES))
|
|
|
|
|
2013-12-16 01:16:20 +01:00
|
|
|
ifeq ($(findstring ebox,$(MAKECMDGOALS)),ebox)
|
|
|
|
CFLAGS+=-march=pentium-mmx
|
|
|
|
endif
|
2013-12-15 09:09:20 +01:00
|
|
|
|
|
|
|
# targets
|
|
|
|
|
|
|
|
|
2014-04-11 07:53:42 +02:00
|
|
|
all: lib$(LIBRARY).a $(LIBRARY).dll
|
2013-12-15 09:09:20 +01:00
|
|
|
|
2014-04-11 07:53:42 +02:00
|
|
|
ebox: lib$(LIBRARY).a $(LIBRARY).dll
|
2013-12-15 09:09:20 +01:00
|
|
|
|
2014-04-11 07:53:42 +02:00
|
|
|
lib$(LIBRARY).a: $(OBJECTS) Makefile
|
2014-04-21 19:06:44 +02:00
|
|
|
$(AR) $(ARFLAGS) lib$(LIBRARY).a $(OBJECTS)
|
2014-04-11 07:53:42 +02:00
|
|
|
mv -f lib$(LIBRARY).a ../../lib
|
2013-12-15 09:09:20 +01:00
|
|
|
|
|
|
|
|
|
|
|
$(LIBRARY).dll: $(OBJECTS) Makefile
|
|
|
|
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(OBJECTS) $(LIBS)
|
2014-04-21 19:06:44 +02:00
|
|
|
#sed -e "s/ @[^ ]*//" $(LIBRARY).orig.def > $(LIBRARY).def
|
|
|
|
#sed -f ../newlib/cmd1.sed $(LIBRARY).def > mem
|
|
|
|
#sed -f ../newlib/cmd2.sed mem >$(LIBRARY).inc
|
2013-12-15 09:09:20 +01:00
|
|
|
mv -f $@ ../../bin
|
2014-04-11 07:53:42 +02:00
|
|
|
mv -f lib$(LIBRARY).dll.a ../../lib
|
2013-12-15 09:09:20 +01:00
|
|
|
|
|
|
|
%.o : %.c
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f */*.o
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|