forked from gittup/tup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tuprules.tup
73 lines (61 loc) · 1.88 KB
/
Tuprules.tup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
.gitignore
CC = gcc
ifeq (@(TUP_DEBUG),y)
CFLAGS += -g
else
CFLAGS += -Os
endif
CFLAGS += -W
CFLAGS += -Wall
ifeq (@(TUP_WERROR),y)
CFLAGS += -Werror
endif
CFLAGS += -Wbad-function-cast
CFLAGS += -Wcast-align
CFLAGS += -Wcast-qual
CFLAGS += -Wchar-subscripts
CFLAGS += -Wmissing-prototypes
CFLAGS += -Wnested-externs
CFLAGS += -Wpointer-arith
CFLAGS += -Wredundant-decls
CFLAGS += -Wshadow
CFLAGS += -Wstrict-prototypes
CFLAGS += -Wwrite-strings
CFLAGS += -Wswitch-enum
CFLAGS += -fno-common
CFLAGS += -I$(TUP_CWD)/src
ifeq (@(TUP_32_BIT),y)
CFLAGS += -m32
LDFLAGS += -m32
endif
export PKG_CONFIG_PATH
CFLAGS += `pkg-config fuse --cflags`
# Compatibility function prototypes and include path for wrapper functions
MINGWCFLAGS += -include $(TUP_CWD)/src/compat/win32/mingw.h
MINGWCFLAGS += -I$(TUP_CWD)/src/compat/win32
# _GNU_SOURCE lets us use the %lli flag correctly
MINGWCFLAGS += -D_GNU_SOURCE
# No symlinks on windows
MINGWCFLAGS += -D'S_ISLNK(a)=0'
MINGWCFLAGS += -Dlstat=stat
# No sig_atomic_t on windows
MINGWCFLAGS += -Dsig_atomic_t=int
# Use the same value as linux here. The logic is in src/compat/unlinkat.c
MINGWCFLAGS += -DAT_REMOVEDIR=0x200
!cc = |> ^ CC %f^ $(CC) -c %f -o %o $(CFLAGS) $(CFLAGS_%f) |> %B.o
!ld = |> ^ LINK %o^ $(CC) %f -o %o $(LDFLAGS) $(LDFLAGS_%o) |>
!ar = |> ^ AR %o^ ar crs %o %f |>
!dot = |> ^ DOT %f^ dot -Efontname="Vernada, serif" -Nfontname="Vernada, serif" -Efontsize=10 -Nfontsize=10 -Tpng %f > %o |>
!cp = |> ^ CP %f -> %o^ cp %f %o |>
ifeq (@(TUP_MINGW),)
!mingwcc = |> |>
!mingwcc32 = |> |>
!mingwar = |> |>
else
!mingwcc = |> ^ MINGWCC %f^ @(TUP_MINGW)-gcc -c %f -o %o $(CFLAGS) $(CFLAGS_%f) $(MINGWCFLAGS) |> %B.omingw
!mingwcc32 = |> ^ MINGW32CC %f^ @(TUP_MINGW32)-gcc -c %f -o %o $(CFLAGS) $(CFLAGS_%f) $(MINGWCFLAGS) |> %B.omingw32
!mingwar = |> ^ MINGWAR %o^ @(TUP_MINGW)-ar crs %o %f |>
endif
TUP_MONITOR = null
TUP_SUID_GROUP = root
include @(TUP_PLATFORM).tup