From: Vladimir Vukicevic Date: Tue, 4 Sep 2007 18:19:33 +0000 (-0700) Subject: [win32] Makefile and compilation fixes for win32 X-Git-Tag: pixman-0.9.6~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1b098ede1938d1225c32cf5639e4c7a891859897;p=platform%2Fupstream%2Fpixman.git [win32] Makefile and compilation fixes for win32 --- diff --git a/.gitignore b/.gitignore index ee2f0a3..7f08f61 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,8 @@ config.h.in .*.swp test/composite-test test/gradient-test +*.pdb +*.dll +*.lib +*.ilk +*.obj diff --git a/pixman/Makefile.win32 b/pixman/Makefile.win32 new file mode 100644 index 0000000..e0a1828 --- /dev/null +++ b/pixman/Makefile.win32 @@ -0,0 +1,31 @@ +LIBRARY = pixman-1 + +CC = cl +LINK = link + +CFLAGS = -MD -Zi -nologo -O2 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -I../pixman/src -I. -DPACKAGE=$(LIBRARY) -DPACKAGE_VERSION="" -DPACKAGE_BUGREPORT="" + +SOURCES = \ + pixman-region.c \ + pixman-image.c \ + pixman-compose.c \ + pixman-compose-accessors.c \ + pixman-pict.c \ + pixman-utils.c \ + pixman-edge.c \ + pixman-edge-accessors.c \ + pixman-trap.c \ + pixman-compute-region.c \ + pixman-timer.c \ + $(NULL) + +OBJECTS = $(subst .c,.obj,$(SOURCES)) + +%.obj: %.c + @$(CC) -c $(CFLAGS) -Fo"$@" $< + +$(LIBRARY).lib: $(OBJECTS) + lib -NOLOGO -OUT:$@ $(OBJECTS) + +clean: + @rm -f *.obj *.lib *.pdb *.ilk || exit 0 diff --git a/pixman/pixman-compose.c b/pixman/pixman-compose.c index b48251d..1e91864 100644 --- a/pixman/pixman-compose.c +++ b/pixman/pixman-compose.c @@ -23,7 +23,9 @@ * SOFTWARE. */ +#ifdef HAVE_CONFIG_H #include +#endif #include #include diff --git a/pixman/pixman-compute-region.c b/pixman/pixman-compute-region.c index f9b9de7..1e566a9 100644 --- a/pixman/pixman-compute-region.c +++ b/pixman/pixman-compute-region.c @@ -21,7 +21,10 @@ * PERFORMANCE OF THIS SOFTWARE. */ +#ifdef HAVE_CONFIG_H #include +#endif + #include #include #include "pixman-private.h" diff --git a/pixman/pixman-edge.c b/pixman/pixman-edge.c index 24758c3..12c1967 100644 --- a/pixman/pixman-edge.c +++ b/pixman/pixman-edge.c @@ -21,7 +21,11 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ + +#ifdef HAVE_CONFIG_H #include +#endif + #include #include "pixman.h" #include "pixman-private.h" diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c index c39ee9b..fa32208 100644 --- a/pixman/pixman-image.c +++ b/pixman/pixman-image.c @@ -20,7 +20,9 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#ifdef HAVE_CONFIG_H #include +#endif #include #include diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c index 8c7be6d..be79124 100644 --- a/pixman/pixman-mmx.c +++ b/pixman/pixman-mmx.c @@ -28,7 +28,10 @@ * * Based on work by Owen Taylor */ + +#ifdef HAVE_CONFIG_H #include +#endif #ifdef USE_MMX diff --git a/pixman/pixman-pict.c b/pixman/pixman-pict.c index c7d73fc..3bc5267 100644 --- a/pixman/pixman-pict.c +++ b/pixman/pixman-pict.c @@ -22,7 +22,10 @@ * Author: Keith Packard, SuSE, Inc. */ +#ifdef HAVE_CONFIG_H #include +#endif + #include #include #include diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h index 775f7a7..6487bfd 100644 --- a/pixman/pixman-private.h +++ b/pixman/pixman-private.h @@ -37,6 +37,28 @@ # define FUNC ((const char*) ("???")) #endif +#ifndef INT16_MIN +# define INT16_MIN (-32767-1) +# define INT16_MAX (32767) +#endif + +#ifndef INT32_MIN +# define INT32_MIN (-2147483647-1) +# define INT32_MAX (2147483647) +#endif + +#ifndef UINT32_MIN +# define UINT32_MIN (0) +# define UINT32_MAX (4294967295U) +#endif + +#ifndef M_PI +# define M_PI 3.14159265358979323846 +#endif + +#ifdef _MSC_VER +#define inline __inline +#endif #define FB_SHIFT 5 #define FB_UNIT (1 << FB_SHIFT) @@ -774,6 +796,8 @@ pixman_rasterize_edges_accessors (pixman_image_t *image, pixman_fixed_t b); +#ifdef PIXMAN_TIMING + /* Timing */ static inline uint64_t oil_profile_stamp_rdtsc (void) @@ -817,5 +841,6 @@ void pixman_timer_register (PixmanTimer *timer); timer##tname.total += OIL_STAMP() - begin##tname; \ } +#endif /* PIXMAN_TIMING */ #endif /* PIXMAN_PRIVATE_H */ diff --git a/pixman/pixman-region.c b/pixman/pixman-region.c index 94b6dcc..fff49e7 100644 --- a/pixman/pixman-region.c +++ b/pixman/pixman-region.c @@ -45,7 +45,10 @@ SOFTWARE. ******************************************************************/ +#ifdef HAVE_CONFIG_H #include +#endif + #include #include #include diff --git a/pixman/pixman-timer.c b/pixman/pixman-timer.c index c762644..ce54e74 100644 --- a/pixman/pixman-timer.c +++ b/pixman/pixman-timer.c @@ -19,11 +19,16 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#ifdef HAVE_CONFIG_H #include +#endif + #include #include #include "pixman-private.h" +#ifdef PIXMAN_TIMER + static PixmanTimer *timers; static void @@ -57,3 +62,5 @@ pixman_timer_register (PixmanTimer *timer) timer->next = timers; timers = timer; } + +#endif diff --git a/pixman/pixman-trap.c b/pixman/pixman-trap.c index 204ca04..ed32e92 100644 --- a/pixman/pixman-trap.c +++ b/pixman/pixman-trap.c @@ -22,7 +22,10 @@ * PERFORMANCE OF THIS SOFTWARE. */ +#ifdef HAVE_CONFIG_H #include +#endif + #include #include "pixman-private.h" diff --git a/pixman/pixman-utils.c b/pixman/pixman-utils.c index cdf115d..fc93608 100644 --- a/pixman/pixman-utils.c +++ b/pixman/pixman-utils.c @@ -21,7 +21,10 @@ * Author: Keith Packard, SuSE, Inc. */ +#ifdef HAVE_CONFIG_H #include +#endif + #include #include "pixman.h" #include "pixman-private.h"