1 #
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
5 # 1.0 of the CDDL.
6 #
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
10 #
11
12 #
13 # Copyright 2016 Toomas Soome <tsoome@me.com>
14 #
15
16 #
17 # Notes:
18 # - We don't use the libc strerror/sys_errlist because the string table is
19 # quite large.
20 #
21
22 # standalone components and stuff we have modified locally
23 SRCS= $(ZLIB)/gzguts.h $(ZLIB)/zutil.h
24 SRCS += $(SASRC)/__main.c $(SASRC)/assert.c
25 SRCS += $(SASRC)/bcd.c $(SASRC)/environment.c
26 SRCS += $(SASRC)/getopt.c $(SASRC)/strtol.c
27 SRCS += $(SASRC)/strtoul.c $(SASRC)/random.c
28 SRCS += $(SASRC)/sbrk.c $(SASRC)/twiddle.c
29 SRCS += $(SASRC)/zalloc.c $(SASRC)/zalloc_malloc.c
30
31 OBJS= __main.o assert.o bcd.o environment.o \
32 getopt.o gets.o globals.o pager.o panic.o printf.o \
33 strdup.o strerror.o strtol.o strtoul.o random.o \
68 strpbrk.o strrchr.o strsep.o strspn.o strstr.o strtok.o swab.o
69
70 # uuid functions from libc
71 SRCS += $(LIBSRC)/libc/uuid/uuid_create_nil.c
72 SRCS += $(LIBSRC)/libc/uuid/uuid_equal.c
73 SRCS += $(LIBSRC)/libc/uuid/uuid_is_nil.c
74
75 SRCS += $(SASRC)/uuid_from_string.c
76 SRCS += $(SASRC)/uuid_to_string.c
77
78 OBJS += uuid_create_nil.o uuid_equal.o uuid_from_string.o uuid_is_nil.o \
79 uuid_to_string.o
80
81 # decompression functionality from libbz2
82 # NOTE: to actually test this functionality after libbz2 upgrade compile
83 # loader(8) with LOADER_BZIP2_SUPPORT defined
84 _bzlib.o _crctable.o _decompress.o _huffman.o _randtable.o bzipfs.o \
85 := CFLAGS += -DBZ_LOADER -DBZ_NO_STDIO -DBZ_NO_COMPRESS
86 SRCS += libstand_bzlib_private.h
87
88 SRCS += _bzlib.c _crctable.c _decompress.c _huffman.c _randtable.c
89 OBJS += _bzlib.o _crctable.o _decompress.o _huffman.o _randtable.o
90 CLEANFILES += _bzlib.c _crctable.c _decompress.c _huffman.c _randtable.c
91
92 _bzlib.c: $(SRC)/common/bzip2/bzlib.c
93 sed "s|bzlib_private\.h|libstand_bzlib_private.h|" $^ > $@
94
95 _crctable.c: $(SRC)/common/bzip2/crctable.c
96 sed "s|bzlib_private\.h|libstand_bzlib_private.h|" $^ > $@
97
98 _decompress.c: $(SRC)/common/bzip2/decompress.c
99 sed "s|bzlib_private\.h|libstand_bzlib_private.h|" $^ > $@
100
101 _huffman.c: $(SRC)/common/bzip2/huffman.c
102 sed "s|bzlib_private\.h|libstand_bzlib_private.h|" $^ > $@
103
104 _randtable.c: $(SRC)/common/bzip2/randtable.c
105 sed "s|bzlib_private\.h|libstand_bzlib_private.h|" $^ > $@
106
107 CLEANFILES += libstand_bzlib_private.h
|
1 #
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
5 # 1.0 of the CDDL.
6 #
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
10 #
11
12 #
13 # Copyright 2016 Toomas Soome <tsoome@me.com>
14 # Copyright 2019 Joyent, Inc.
15 #
16
17 #
18 # Notes:
19 # - We don't use the libc strerror/sys_errlist because the string table is
20 # quite large.
21 #
22
23 # standalone components and stuff we have modified locally
24 SRCS= $(ZLIB)/gzguts.h $(ZLIB)/zutil.h
25 SRCS += $(SASRC)/__main.c $(SASRC)/assert.c
26 SRCS += $(SASRC)/bcd.c $(SASRC)/environment.c
27 SRCS += $(SASRC)/getopt.c $(SASRC)/strtol.c
28 SRCS += $(SASRC)/strtoul.c $(SASRC)/random.c
29 SRCS += $(SASRC)/sbrk.c $(SASRC)/twiddle.c
30 SRCS += $(SASRC)/zalloc.c $(SASRC)/zalloc_malloc.c
31
32 OBJS= __main.o assert.o bcd.o environment.o \
33 getopt.o gets.o globals.o pager.o panic.o printf.o \
34 strdup.o strerror.o strtol.o strtoul.o random.o \
69 strpbrk.o strrchr.o strsep.o strspn.o strstr.o strtok.o swab.o
70
71 # uuid functions from libc
72 SRCS += $(LIBSRC)/libc/uuid/uuid_create_nil.c
73 SRCS += $(LIBSRC)/libc/uuid/uuid_equal.c
74 SRCS += $(LIBSRC)/libc/uuid/uuid_is_nil.c
75
76 SRCS += $(SASRC)/uuid_from_string.c
77 SRCS += $(SASRC)/uuid_to_string.c
78
79 OBJS += uuid_create_nil.o uuid_equal.o uuid_from_string.o uuid_is_nil.o \
80 uuid_to_string.o
81
82 # decompression functionality from libbz2
83 # NOTE: to actually test this functionality after libbz2 upgrade compile
84 # loader(8) with LOADER_BZIP2_SUPPORT defined
85 _bzlib.o _crctable.o _decompress.o _huffman.o _randtable.o bzipfs.o \
86 := CFLAGS += -DBZ_LOADER -DBZ_NO_STDIO -DBZ_NO_COMPRESS
87 SRCS += libstand_bzlib_private.h
88
89 # too hairy
90 _inflate.o := SMATCH=off
91
92 SRCS += _bzlib.c _crctable.c _decompress.c _huffman.c _randtable.c
93 OBJS += _bzlib.o _crctable.o _decompress.o _huffman.o _randtable.o
94 CLEANFILES += _bzlib.c _crctable.c _decompress.c _huffman.c _randtable.c
95
96 _bzlib.c: $(SRC)/common/bzip2/bzlib.c
97 sed "s|bzlib_private\.h|libstand_bzlib_private.h|" $^ > $@
98
99 _crctable.c: $(SRC)/common/bzip2/crctable.c
100 sed "s|bzlib_private\.h|libstand_bzlib_private.h|" $^ > $@
101
102 _decompress.c: $(SRC)/common/bzip2/decompress.c
103 sed "s|bzlib_private\.h|libstand_bzlib_private.h|" $^ > $@
104
105 _huffman.c: $(SRC)/common/bzip2/huffman.c
106 sed "s|bzlib_private\.h|libstand_bzlib_private.h|" $^ > $@
107
108 _randtable.c: $(SRC)/common/bzip2/randtable.c
109 sed "s|bzlib_private\.h|libstand_bzlib_private.h|" $^ > $@
110
111 CLEANFILES += libstand_bzlib_private.h
|