-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.mk.bsd
101 lines (75 loc) · 1.62 KB
/
config.mk.bsd
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Change these to change mpkg configuration
CONFIG_BZIP2=1
CONFIG_GZIP=1
CONFIG_PKGFMT_V1=1
CONFIG_PKGFMT_V2=1
CONFIG_BDB=1
CONFIG_MD5_DEFAULT=1
CONFIG_MTRACE=0
# Try BDB_INCLUDE=-I/usr/local/include/db4 and BDB_LIBS=-L/usr/local/lib
# for OpenBSD
BDB_INCLUDE=-I/usr/local/include/db4
BDB_LIBS=-L/usr/local/lib
# Try BZIP2_INCLUDE=-I/usr/local/include and BDB_LIBS=-L/usr/local/lib
# for OpenBSD
BZIP2_INCLUDE=-I/usr/local/include
BZIP2_LIBS=-L/usr/local/lib
GZIP_INCLUDE=
GZIP_LIBS=
# Set these to the appropriate commands for your platform, or override them
# on the command line.
CC=cc
GZIP=gzip -9
INSTALL=install
LN=ln
MKDIR=mkdir
RM=rm
STRIP=strip
TAR=tar
# Installation-related defaults
DESTDIR=
PREFIX=/usr
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/share/man
# Adjust this appropriately too
CFLAGS=-O2 -g -Werror
BUILD_DATE != date +%Y-%m-%d
CFLAGS+=-DBUILD_DATE=\"$(BUILD_DATE)\"
.if $(CONFIG_BZIP2) == 1
CFLAGS+=-DCOMPRESSION_BZIP2
CFLAGS+=$(BZIP2_INCLUDE)
.endif
.if $(CONFIG_GZIP) == 1
CFLAGS+=-DCOMPRESSION_GZIP
CFLAGS+=$(GZIP_INCLUDE)
.endif
.if $(CONFIG_PKGFMT_V1) == 1
CFLAGS+=-DPKGFMT_V1
.endif
.if $(CONFIG_PKGFMT_V2) == 1
CFLAGS+=-DPKGFMT_V2
.endif
.if $(CONFIG_BDB) == 1
CFLAGS+=-DDB_BDB
CFLAGS+=$(BDB_INCLUDE)
.endif
.if $(CONFIG_MD5_DEFAULT) == 1
CFLAGS+=-DCHECK_MD5_DEFAULT
.endif
.if $(CONFIG_MTRACE) == 1
CFLAGS+=-DUSE_MTRACE
.endif
# Put any LDFLAGS you need here
LDFLAGS=
.if $(CONFIG_BDB) == 1
LDFLAGS+=$(BDB_LIBS)
LDFLAGS+=-ldb
.endif
.if $(CONFIG_BZIP2) == 1
LDFLAGS+=$(BZIP2_LIBS)
LDFLAGS+=-lbz2
.endif
.if $(CONFIG_GZIP) == 1
LDFLAGS+=$(GZIP_LIBS)
LDFLAGS+=-lz
.endif