LIBRARY = pixman-1
CC = cl
LINK = link
ifeq ($(CFG),)
CFG=release
endif
ifeq ($(MMX),)
MMX=1
endif
CFLAGS = -MD -nologo -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -I../pixman/src -I. -DPACKAGE=$(LIBRARY) -DPACKAGE_VERSION="" -DPACKAGE_BUGREPORT=""
MMX_CFLAGS = -DUSE_MMX -w14710 -w14714
ifeq ($(CFG),debug)
CFLAGS += -Od -Zi
else
CFLAGS += -O2
endif
SOURCES = \
pixman-region.c \
pixman-image.c \
pixman-access.c \
pixman-access-accessors.c \
pixman-combine.c \
pixman-compose.c \
pixman-compose-accessors.c \
pixman-pict.c \
pixman-source.c \
pixman-transformed.c \
pixman-transformed-accessors.c \
pixman-utils.c \
pixman-edge.c \
pixman-edge-accessors.c \
pixman-trap.c \
pixman-compute-region.c \
pixman-timer.c \
$(NULL)
ifeq ($(MMX),1)
CFLAGS += $(MMX_CFLAGS)
SOURCES += pixman-mmx.c
endif
OBJECTS = $(patsubst %.c, $(CFG)/%.obj, $(SOURCES))
all: inform informMMX $(CFG)/$(LIBRARY).lib
@exit 0
clean: inform clean_r
@exit 0
pixman: inform informMMX $(CFG)/$(LIBRARY).lib
@exit 0
inform:
ifneq ($(CFG),release)
ifneq ($(CFG),debug)
@echo "Invalid specified configuration option : "$(CFG)"."
@echo
@echo -n "Possible choices for configuration are "
@echo "'release' and 'debug'"
@echo ""
@exit 1
endif
endif
informMMX:
ifneq ($(MMX),0)
ifneq ($(MMX),1)
@echo "Invalid specified MMX option : "$(MMX)"."
@echo
@echo -n "Possible choices for MMX are 0 or 1"
@echo ""
@exit 1
endif
endif
$(CFG)/%.obj: %.c
@mkdir -p $(CFG)
@$(CC) -c $(CFLAGS) -Fo"$@" $<
$(CFG)/$(LIBRARY).lib: $(OBJECTS)
lib -NOLOGO -OUT:$@ $(OBJECTS) || exit 0
clean_r:
@rm -f $(CFG)/*.obj $(CFG)/*.lib $(CFG)/*.pdb $(CFG)/*.ilk || exit 0