[win32] Makefile and compilation fixes for win32
authorVladimir Vukicevic <vladimir@pobox.com>
Tue, 4 Sep 2007 18:19:33 +0000 (11:19 -0700)
committerVladimir Vukicevic <vladimir@pobox.com>
Thu, 6 Sep 2007 18:51:55 +0000 (11:51 -0700)
13 files changed:
.gitignore
pixman/Makefile.win32 [new file with mode: 0644]
pixman/pixman-compose.c
pixman/pixman-compute-region.c
pixman/pixman-edge.c
pixman/pixman-image.c
pixman/pixman-mmx.c
pixman/pixman-pict.c
pixman/pixman-private.h
pixman/pixman-region.c
pixman/pixman-timer.c
pixman/pixman-trap.c
pixman/pixman-utils.c

index ee2f0a3..7f08f61 100644 (file)
@@ -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 (file)
index 0000000..e0a1828
--- /dev/null
@@ -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
index b48251d..1e91864 100644 (file)
@@ -23,7 +23,9 @@
  * SOFTWARE.
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
 
 #include <stdlib.h>
 #include <string.h>
index f9b9de7..1e566a9 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
+
 #include <stdlib.h>
 #include <stdio.h>
 #include "pixman-private.h"
index 24758c3..12c1967 100644 (file)
  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  * PERFORMANCE OF THIS SOFTWARE.
  */
+
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
+
 #include <string.h>
 #include "pixman.h"
 #include "pixman-private.h"
index c39ee9b..fa32208 100644 (file)
@@ -20,7 +20,9 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
 
 #include <stdlib.h>
 #include <stdio.h>
index 8c7be6d..be79124 100644 (file)
  *
  * Based on work by Owen Taylor
  */
+
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
 
 #ifdef USE_MMX
 
index c7d73fc..3bc5267 100644 (file)
  * Author:  Keith Packard, SuSE, Inc.
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 775f7a7..6487bfd 100644 (file)
 #  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 */
index 94b6dcc..fff49e7 100644 (file)
@@ -45,7 +45,10 @@ SOFTWARE.
 
 ******************************************************************/
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
+
 #include <stdlib.h>
 #include <limits.h>
 #include <string.h>
index c762644..ce54e74 100644 (file)
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
+
 #include <stdlib.h>
 #include <stdio.h>
 #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
index 204ca04..ed32e92 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
+
 #include <stdio.h>
 #include "pixman-private.h"
 
index cdf115d..fc93608 100644 (file)
  * Author:  Keith Packard, SuSE, Inc.
  */
 
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
+
 #include <stdlib.h>
 #include "pixman.h"
 #include "pixman-private.h"