~kiko/pixman/trunk

« back to all changes in this revision

Viewing changes to Makefile.win32.common

  • Committer: Matt Turner
  • Author(s): Simon Richter
  • Date: 2019-03-27 22:12:52 UTC
  • Revision ID: git-v1:ef4fb03248ae7748090ec52f02261c331590579c
Windows: Support building with SHELL=cmd.exe

When GNU Make is not from msys, the startup cost for sh.exe is massive
compared to cmd.exe.

Signed-off-by: Matt Turner <mattst88@gmail.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
LIBRARY = pixman-1
2
2
 
 
3
ifeq ($(shell echo ""),)
 
4
# POSIX style shell
 
5
mkdir_p = mkdir -p $1
 
6
rm = $(RM) $1
 
7
echo = echo "$1"
 
8
else
 
9
# DOS/Windows style shell
 
10
mkdir_p = if not exist $(subst /,\,$1) md $(subst /,\,$1)
 
11
echo = echo $1
 
12
rm = del $(subst /,\,$1)
 
13
endif
 
14
 
3
15
CC = cl
4
16
LD = link
5
17
AR = lib
50
62
endif
51
63
 
52
64
$(CFG_VAR):
53
 
        @mkdir $@
 
65
        @$(call mkdir_p,$@)
54
66
 
55
67
$(CFG_VAR)/%.obj: %.c $(libpixman_headers) | $(CFG_VAR)
56
68
        $(CC) -c $(PIXMAN_CFLAGS) -Fo"$@" $<
57
69
 
58
70
clean: inform $(CFG_VAR)
59
 
        @cd $(CFG_VAR) && echo > silence_error.exe && $(RM) *.exe *.ilk *.lib *.obj *.pdb
 
71
        -$(call rm,$(CFG_VAR)/*.exe $(CFG_VAR)/*.ilk $(CFG_VAR)/*.lib $(CFG_VAR)/*.obj $(CFG_VAR)/*.pdb)
60
72
 
61
73
.PHONY: inform clean