mirror of
https://salsa.debian.org/xorg-team/lib/pixman
synced 2025-09-04 00:13:41 +00:00

The `rm` command is not usually available when running on Win32 in a `cmd.exe` shell. Instead the shell provides the `del` builtin, which has somewhat more limited wildcars expansion and error handling. This makes all of the Makefile targets work on Win32 both using `cmd.exe` and using the MSYS environment. Signed-off-by: Simon Richter <Simon.Richter@hogyros.de> Signed-off-by: Andrea Canciani <ranma42@gmail.com> Acked-by: Oded Gabbay <oded.gabbay@gmail.com>
62 lines
1.3 KiB
Makefile
62 lines
1.3 KiB
Makefile
LIBRARY = pixman-1
|
|
|
|
CC = cl
|
|
LD = link
|
|
AR = lib
|
|
PERL = perl
|
|
|
|
ifneq ($(shell echo ""),)
|
|
RM = del
|
|
endif
|
|
|
|
ifeq ($(top_builddir),)
|
|
top_builddir = $(top_srcdir)
|
|
endif
|
|
|
|
CFG_VAR = $(CFG)
|
|
ifeq ($(CFG_VAR),)
|
|
CFG_VAR = release
|
|
endif
|
|
|
|
ifeq ($(CFG_VAR),debug)
|
|
CFG_CFLAGS = -MDd -Od -Zi
|
|
CFG_LDFLAGS = -DEBUG
|
|
else
|
|
CFG_CFLAGS = -MD -O2
|
|
CFG_LDFLAGS =
|
|
endif
|
|
|
|
# Package definitions, to be used instead of those provided in config.h
|
|
PKG_CFLAGS = -DPACKAGE=$(LIBRARY) -DPACKAGE_VERSION="" -DPACKAGE_BUGREPORT=""
|
|
|
|
BASE_CFLAGS = -nologo -I. -I$(top_srcdir) -I$(top_srcdir)/pixman
|
|
|
|
PIXMAN_CFLAGS = $(BASE_CFLAGS) $(PKG_CFLAGS) $(CFG_CFLAGS) $(CFLAGS)
|
|
PIXMAN_LDFLAGS = -nologo $(CFG_LDFLAGS) $(LDFLAGS)
|
|
PIXMAN_ARFLAGS = -nologo $(LDFLAGS)
|
|
|
|
|
|
inform:
|
|
ifneq ($(CFG),release)
|
|
ifneq ($(CFG),debug)
|
|
ifneq ($(CFG),)
|
|
@echo "Invalid specified configuration option: "$(CFG)"."
|
|
@echo
|
|
@echo "Possible choices for configuration are 'release' and 'debug'"
|
|
@exit 1
|
|
endif
|
|
@echo "Using default RELEASE configuration... (use CFG=release or CFG=debug)"
|
|
endif
|
|
endif
|
|
|
|
$(CFG_VAR):
|
|
@mkdir $@
|
|
|
|
$(CFG_VAR)/%.obj: %.c $(libpixman_headers) | $(CFG_VAR)
|
|
@$(CC) -c $(PIXMAN_CFLAGS) -Fo"$@" $<
|
|
|
|
clean: inform $(CFG_VAR)
|
|
@cd $(CFG_VAR) && echo > silence_error.exe && $(RM) *.exe *.ilk *.lib *.obj *.pdb
|
|
|
|
.PHONY: inform clean
|