Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 1 | # |
| 2 | # Makefile for musl (requires GNU make) |
| 3 | # |
| 4 | # This is how simple every makefile should be... |
| 5 | # No, I take that back - actually most should be less than half this size. |
| 6 | # |
| 7 | # Use config.mak to override any of the following variables. |
| 8 | # Do not make changes here. |
| 9 | # |
| 10 | |
| 11 | exec_prefix = /usr/local |
| 12 | bindir = $(exec_prefix)/bin |
| 13 | |
| 14 | prefix = /usr/local/musl |
| 15 | includedir = $(prefix)/include |
| 16 | libdir = $(prefix)/lib |
Rich Felker | 207c45d | 2011-06-27 21:38:11 -0400 | [diff] [blame] | 17 | syslibdir = /lib |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 18 | |
rofl0r | 158f721 | 2013-02-06 02:11:49 +0100 | [diff] [blame] | 19 | SRCS = $(sort $(wildcard src/*/*.c arch/$(ARCH)/src/*.c)) |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 20 | OBJS = $(SRCS:.c=.o) |
| 21 | LOBJS = $(OBJS:.o=.lo) |
| 22 | GENH = include/bits/alltypes.h |
Rich Felker | 179ab5a | 2013-12-01 17:27:25 -0500 | [diff] [blame] | 23 | GENH_INT = src/internal/version.h |
Rich Felker | e765239 | 2012-05-03 20:35:11 -0400 | [diff] [blame] | 24 | IMPH = src/internal/stdio_impl.h src/internal/pthread_impl.h src/internal/libc.h |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 25 | |
Rich Felker | 4cd8b47 | 2015-11-02 16:58:14 -0500 | [diff] [blame] | 26 | LDFLAGS = |
| 27 | LDFLAGS_AUTO = |
Rich Felker | 1b23145 | 2012-08-02 21:05:43 -0400 | [diff] [blame] | 28 | LIBCC = -lgcc |
Rich Felker | d76eafc | 2012-05-01 19:30:03 -0400 | [diff] [blame] | 29 | CPPFLAGS = |
Rich Felker | 4cd8b47 | 2015-11-02 16:58:14 -0500 | [diff] [blame] | 30 | CFLAGS = |
| 31 | CFLAGS_AUTO = -Os -pipe |
Rich Felker | d76eafc | 2012-05-01 19:30:03 -0400 | [diff] [blame] | 32 | CFLAGS_C99FSE = -std=c99 -ffreestanding -nostdinc |
| 33 | |
| 34 | CFLAGS_ALL = $(CFLAGS_C99FSE) |
Rich Felker | fcaec91 | 2012-07-11 02:44:14 -0400 | [diff] [blame] | 35 | CFLAGS_ALL += -D_XOPEN_SOURCE=700 -I./arch/$(ARCH) -I./src/internal -I./include |
Rich Felker | 4cd8b47 | 2015-11-02 16:58:14 -0500 | [diff] [blame] | 36 | CFLAGS_ALL += $(CPPFLAGS) $(CFLAGS_AUTO) $(CFLAGS) |
Rich Felker | d76eafc | 2012-05-01 19:30:03 -0400 | [diff] [blame] | 37 | CFLAGS_ALL_STATIC = $(CFLAGS_ALL) |
Rich Felker | 9f74574 | 2012-09-14 23:38:10 -0400 | [diff] [blame] | 38 | CFLAGS_ALL_SHARED = $(CFLAGS_ALL) -fPIC -DSHARED |
Rich Felker | d76eafc | 2012-05-01 19:30:03 -0400 | [diff] [blame] | 39 | |
Rich Felker | 4cd8b47 | 2015-11-02 16:58:14 -0500 | [diff] [blame] | 40 | LDFLAGS_ALL = $(LDFLAGS_AUTO) $(LDFLAGS) |
| 41 | |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 42 | AR = $(CROSS_COMPILE)ar |
| 43 | RANLIB = $(CROSS_COMPILE)ranlib |
Rich Felker | e678fc6 | 2013-08-17 22:21:11 -0400 | [diff] [blame] | 44 | INSTALL = ./tools/install.sh |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 45 | |
Rich Felker | d66ab4f | 2013-07-01 13:43:43 -0400 | [diff] [blame] | 46 | ARCH_INCLUDES = $(wildcard arch/$(ARCH)/bits/*.h) |
| 47 | ALL_INCLUDES = $(sort $(wildcard include/*.h include/*/*.h) $(GENH) $(ARCH_INCLUDES:arch/$(ARCH)/%=include/%)) |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 48 | |
Rich Felker | 41d5183 | 2011-02-24 16:37:21 -0500 | [diff] [blame] | 49 | EMPTY_LIB_NAMES = m rt pthread crypt util xnet resolv dl |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 50 | EMPTY_LIBS = $(EMPTY_LIB_NAMES:%=lib/lib%.a) |
Rich Felker | dc031ee | 2015-05-26 03:37:41 -0400 | [diff] [blame] | 51 | CRT_LIBS = lib/crt1.o lib/Scrt1.o lib/rcrt1.o lib/crti.o lib/crtn.o |
Rich Felker | d76eafc | 2012-05-01 19:30:03 -0400 | [diff] [blame] | 52 | STATIC_LIBS = lib/libc.a |
Rich Felker | 207c45d | 2011-06-27 21:38:11 -0400 | [diff] [blame] | 53 | SHARED_LIBS = lib/libc.so |
Rich Felker | 58f430c | 2012-04-22 14:32:49 -0400 | [diff] [blame] | 54 | TOOL_LIBS = lib/musl-gcc.specs |
Rich Felker | d76eafc | 2012-05-01 19:30:03 -0400 | [diff] [blame] | 55 | ALL_LIBS = $(CRT_LIBS) $(STATIC_LIBS) $(SHARED_LIBS) $(EMPTY_LIBS) $(TOOL_LIBS) |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 56 | ALL_TOOLS = tools/musl-gcc |
| 57 | |
Shiz | b3cd7d1 | 2015-06-28 23:08:19 +0200 | [diff] [blame] | 58 | WRAPCC_GCC = gcc |
Shiz | fb58545 | 2015-06-28 23:08:21 +0200 | [diff] [blame] | 59 | WRAPCC_CLANG = clang |
Shiz | b3cd7d1 | 2015-06-28 23:08:19 +0200 | [diff] [blame] | 60 | |
Rich Felker | 3e7f186 | 2013-07-18 20:30:58 -0400 | [diff] [blame] | 61 | LDSO_PATHNAME = $(syslibdir)/ld-musl-$(ARCH)$(SUBARCH).so.1 |
Rich Felker | 207c45d | 2011-06-27 21:38:11 -0400 | [diff] [blame] | 62 | |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 63 | -include config.mak |
| 64 | |
Rich Felker | 8d54681 | 2011-06-28 08:27:38 -0400 | [diff] [blame] | 65 | all: $(ALL_LIBS) $(ALL_TOOLS) |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 66 | |
Rich Felker | 0780936 | 2012-08-17 19:32:24 -0400 | [diff] [blame] | 67 | install: install-libs install-headers install-tools |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 68 | |
| 69 | clean: |
| 70 | rm -f crt/*.o |
| 71 | rm -f $(OBJS) |
| 72 | rm -f $(LOBJS) |
Rich Felker | 127ab57 | 2011-02-17 17:57:26 -0500 | [diff] [blame] | 73 | rm -f $(ALL_LIBS) lib/*.[ao] lib/*.so |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 74 | rm -f $(ALL_TOOLS) |
Rich Felker | 179ab5a | 2013-12-01 17:27:25 -0500 | [diff] [blame] | 75 | rm -f $(GENH) $(GENH_INT) |
Rich Felker | 1355fdc | 2011-02-15 00:33:23 -0500 | [diff] [blame] | 76 | rm -f include/bits |
| 77 | |
Rich Felker | d76eafc | 2012-05-01 19:30:03 -0400 | [diff] [blame] | 78 | distclean: clean |
| 79 | rm -f config.mak |
| 80 | |
Rich Felker | 1355fdc | 2011-02-15 00:33:23 -0500 | [diff] [blame] | 81 | include/bits: |
Rich Felker | a36164c | 2011-02-17 15:15:03 -0500 | [diff] [blame] | 82 | @test "$(ARCH)" || { echo "Please set ARCH in config.mak before running make." ; exit 1 ; } |
Rich Felker | 1355fdc | 2011-02-15 00:33:23 -0500 | [diff] [blame] | 83 | ln -sf ../arch/$(ARCH)/bits $@ |
| 84 | |
Rich Felker | 9448b05 | 2013-07-22 11:22:36 -0400 | [diff] [blame] | 85 | include/bits/alltypes.h.in: include/bits |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 86 | |
Rich Felker | 9448b05 | 2013-07-22 11:22:36 -0400 | [diff] [blame] | 87 | include/bits/alltypes.h: include/bits/alltypes.h.in include/alltypes.h.in tools/mkalltypes.sed |
| 88 | sed -f tools/mkalltypes.sed include/bits/alltypes.h.in include/alltypes.h.in > $@ |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 89 | |
Rich Felker | ae71a43 | 2013-12-04 18:00:19 -0500 | [diff] [blame] | 90 | src/internal/version.h: $(wildcard VERSION .git) |
Rich Felker | 179ab5a | 2013-12-01 17:27:25 -0500 | [diff] [blame] | 91 | printf '#define VERSION "%s"\n' "$$(sh tools/version.sh)" > $@ |
| 92 | |
Rich Felker | 4f3a928 | 2015-11-18 19:00:44 -0500 | [diff] [blame] | 93 | src/internal/version.o src/internal/version.lo: src/internal/version.h |
Rich Felker | 179ab5a | 2013-12-01 17:27:25 -0500 | [diff] [blame] | 94 | |
Rich Felker | 585ba14 | 2015-06-03 02:00:44 -0400 | [diff] [blame] | 95 | crt/rcrt1.o src/ldso/dlstart.lo src/ldso/dynlink.lo: src/internal/dynlink.h arch/$(ARCH)/reloc.h |
Rich Felker | d043780 | 2012-08-05 12:32:20 -0400 | [diff] [blame] | 96 | |
Rich Felker | 585ba14 | 2015-06-03 02:00:44 -0400 | [diff] [blame] | 97 | crt/crt1.o crt/Scrt1.o crt/rcrt1.o src/ldso/dlstart.lo: $(wildcard arch/$(ARCH)/crt_arch.h) |
| 98 | |
| 99 | crt/rcrt1.o: src/ldso/dlstart.c |
Rich Felker | c5e34da | 2013-07-26 01:49:14 -0400 | [diff] [blame] | 100 | |
Rich Felker | be76cdc | 2015-10-22 23:41:35 -0400 | [diff] [blame] | 101 | crt/Scrt1.o crt/rcrt1.o: CFLAGS_ALL += -fPIC |
Rich Felker | c5e34da | 2013-07-26 01:49:14 -0400 | [diff] [blame] | 102 | |
Rich Felker | a80847d | 2013-07-22 21:22:04 -0400 | [diff] [blame] | 103 | OPTIMIZE_SRCS = $(wildcard $(OPTIMIZE_GLOBS:%=src/%)) |
| 104 | $(OPTIMIZE_SRCS:%.c=%.o) $(OPTIMIZE_SRCS:%.c=%.lo): CFLAGS += -O3 |
| 105 | |
Rich Felker | 4a1f55e | 2013-08-01 17:12:23 -0400 | [diff] [blame] | 106 | MEMOPS_SRCS = src/string/memcpy.c src/string/memmove.c src/string/memcmp.c src/string/memset.c |
Rich Felker | be76cdc | 2015-10-22 23:41:35 -0400 | [diff] [blame] | 107 | $(MEMOPS_SRCS:%.c=%.o) $(MEMOPS_SRCS:%.c=%.lo): CFLAGS_ALL += $(CFLAGS_MEMOPS) |
Rich Felker | 4a1f55e | 2013-08-01 17:12:23 -0400 | [diff] [blame] | 108 | |
Rich Felker | 1ef849c | 2015-04-13 20:13:10 -0400 | [diff] [blame] | 109 | NOSSP_SRCS = $(wildcard crt/*.c) \ |
| 110 | src/env/__libc_start_main.c src/env/__init_tls.c \ |
| 111 | src/thread/__set_thread_area.c src/env/__stack_chk_fail.c \ |
| 112 | src/string/memset.c src/string/memcpy.c \ |
| 113 | src/ldso/dlstart.c src/ldso/dynlink.c |
Rich Felker | be76cdc | 2015-10-22 23:41:35 -0400 | [diff] [blame] | 114 | $(NOSSP_SRCS:%.c=%.o) $(NOSSP_SRCS:%.c=%.lo): CFLAGS_ALL += $(CFLAGS_NOSSP) |
Rich Felker | 1ef849c | 2015-04-13 20:13:10 -0400 | [diff] [blame] | 115 | |
Rich Felker | be76cdc | 2015-10-22 23:41:35 -0400 | [diff] [blame] | 116 | $(CRT_LIBS:lib/%=crt/%): CFLAGS_ALL += -DCRT |
Rich Felker | de2b67f | 2015-04-19 22:05:29 -0400 | [diff] [blame] | 117 | |
Rich Felker | fb72a97 | 2013-08-14 02:50:25 -0400 | [diff] [blame] | 118 | # This incantation ensures that changes to any subarch asm files will |
| 119 | # force the corresponding object file to be rebuilt, even if the implicit |
| 120 | # rule below goes indirectly through a .sub file. |
| 121 | define mkasmdep |
| 122 | $(dir $(patsubst %/,%,$(dir $(1))))$(notdir $(1:.s=.o)): $(1) |
| 123 | endef |
| 124 | $(foreach s,$(wildcard src/*/$(ARCH)*/*.s),$(eval $(call mkasmdep,$(s)))) |
| 125 | |
Alex Dowad | 35b3312 | 2015-07-10 15:03:24 +0200 | [diff] [blame] | 126 | # Choose invocation of assembler to be used |
| 127 | # $(1) is input file, $(2) is output file, $(3) is assembler flags |
| 128 | ifeq ($(ADD_CFI),yes) |
Alex Dowad | 0650a05 | 2015-10-02 13:32:32 +0200 | [diff] [blame] | 129 | AS_CMD = LC_ALL=C awk -f tools/add-cfi.common.awk -f tools/add-cfi.$(ARCH).awk $< | $(CC) -x assembler -c -o $@ - |
Alex Dowad | 35b3312 | 2015-07-10 15:03:24 +0200 | [diff] [blame] | 130 | else |
| 131 | AS_CMD = $(CC) -c -o $@ $< |
| 132 | endif |
| 133 | |
Rich Felker | fb72a97 | 2013-08-14 02:50:25 -0400 | [diff] [blame] | 134 | %.o: $(ARCH)$(ASMSUBARCH)/%.sub |
| 135 | $(CC) $(CFLAGS_ALL_STATIC) -c -o $@ $(dir $<)$(shell cat $<) |
Rich Felker | 90d7772 | 2013-08-11 03:27:35 -0400 | [diff] [blame] | 136 | |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 137 | %.o: $(ARCH)/%.s |
Alex Dowad | 35b3312 | 2015-07-10 15:03:24 +0200 | [diff] [blame] | 138 | $(AS_CMD) $(CFLAGS_ALL_STATIC) |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 139 | |
Rich Felker | e765239 | 2012-05-03 20:35:11 -0400 | [diff] [blame] | 140 | %.o: %.c $(GENH) $(IMPH) |
Rich Felker | d76eafc | 2012-05-01 19:30:03 -0400 | [diff] [blame] | 141 | $(CC) $(CFLAGS_ALL_STATIC) -c -o $@ $< |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 142 | |
Rich Felker | fb72a97 | 2013-08-14 02:50:25 -0400 | [diff] [blame] | 143 | %.lo: $(ARCH)$(ASMSUBARCH)/%.sub |
| 144 | $(CC) $(CFLAGS_ALL_SHARED) -c -o $@ $(dir $<)$(shell cat $<) |
Rich Felker | 804e994 | 2013-08-11 03:49:16 -0400 | [diff] [blame] | 145 | |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 146 | %.lo: $(ARCH)/%.s |
Alex Dowad | 35b3312 | 2015-07-10 15:03:24 +0200 | [diff] [blame] | 147 | $(AS_CMD) $(CFLAGS_ALL_SHARED) |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 148 | |
Rich Felker | e765239 | 2012-05-03 20:35:11 -0400 | [diff] [blame] | 149 | %.lo: %.c $(GENH) $(IMPH) |
Rich Felker | d76eafc | 2012-05-01 19:30:03 -0400 | [diff] [blame] | 150 | $(CC) $(CFLAGS_ALL_SHARED) -c -o $@ $< |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 151 | |
Rich Felker | 207c45d | 2011-06-27 21:38:11 -0400 | [diff] [blame] | 152 | lib/libc.so: $(LOBJS) |
Rich Felker | 4cd8b47 | 2015-11-02 16:58:14 -0500 | [diff] [blame] | 153 | $(CC) $(CFLAGS_ALL_SHARED) $(LDFLAGS_ALL) -nostdlib -shared \ |
Rich Felker | 3fa2eb2 | 2014-06-20 00:25:12 -0400 | [diff] [blame] | 154 | -Wl,-e,_dlstart -Wl,-Bsymbolic-functions \ |
Rich Felker | dfdc337 | 2013-03-09 22:34:11 -0500 | [diff] [blame] | 155 | -o $@ $(LOBJS) $(LIBCC) |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 156 | |
Rich Felker | 4fd1595 | 2011-02-17 17:12:52 -0500 | [diff] [blame] | 157 | lib/libc.a: $(OBJS) |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 158 | rm -f $@ |
| 159 | $(AR) rc $@ $(OBJS) |
| 160 | $(RANLIB) $@ |
| 161 | |
Rich Felker | 4fd1595 | 2011-02-17 17:12:52 -0500 | [diff] [blame] | 162 | $(EMPTY_LIBS): |
| 163 | rm -f $@ |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 164 | $(AR) rc $@ |
| 165 | |
Rich Felker | 4fd1595 | 2011-02-17 17:12:52 -0500 | [diff] [blame] | 166 | lib/%.o: crt/%.o |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 167 | cp $< $@ |
| 168 | |
Rich Felker | 58f430c | 2012-04-22 14:32:49 -0400 | [diff] [blame] | 169 | lib/musl-gcc.specs: tools/musl-gcc.specs.sh config.mak |
| 170 | sh $< "$(includedir)" "$(libdir)" "$(LDSO_PATHNAME)" > $@ |
| 171 | |
| 172 | tools/musl-gcc: config.mak |
Shiz | b3cd7d1 | 2015-06-28 23:08:19 +0200 | [diff] [blame] | 173 | printf '#!/bin/sh\nexec "$${REALGCC:-$(WRAPCC_GCC)}" "$$@" -specs "%s/musl-gcc.specs"\n' "$(libdir)" > $@ |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 174 | chmod +x $@ |
| 175 | |
Shiz | fb58545 | 2015-06-28 23:08:21 +0200 | [diff] [blame] | 176 | tools/%-clang: tools/%-clang.in config.mak |
| 177 | sed -e 's!@CC@!$(WRAPCC_CLANG)!g' -e 's!@PREFIX@!$(prefix)!g' -e 's!@INCDIR@!$(includedir)!g' -e 's!@LIBDIR@!$(libdir)!g' -e 's!@LDSO@!$(LDSO_PATHNAME)!g' $< > $@ |
| 178 | chmod +x $@ |
| 179 | |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 180 | $(DESTDIR)$(bindir)/%: tools/% |
Rich Felker | e678fc6 | 2013-08-17 22:21:11 -0400 | [diff] [blame] | 181 | $(INSTALL) -D $< $@ |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 182 | |
Rich Felker | 207c45d | 2011-06-27 21:38:11 -0400 | [diff] [blame] | 183 | $(DESTDIR)$(libdir)/%.so: lib/%.so |
Rich Felker | e678fc6 | 2013-08-17 22:21:11 -0400 | [diff] [blame] | 184 | $(INSTALL) -D -m 755 $< $@ |
Rich Felker | 207c45d | 2011-06-27 21:38:11 -0400 | [diff] [blame] | 185 | |
Rich Felker | ec05a0b | 2011-06-23 22:13:47 -0400 | [diff] [blame] | 186 | $(DESTDIR)$(libdir)/%: lib/% |
Rich Felker | e678fc6 | 2013-08-17 22:21:11 -0400 | [diff] [blame] | 187 | $(INSTALL) -D -m 644 $< $@ |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 188 | |
Rich Felker | d66ab4f | 2013-07-01 13:43:43 -0400 | [diff] [blame] | 189 | $(DESTDIR)$(includedir)/bits/%: arch/$(ARCH)/bits/% |
Rich Felker | e678fc6 | 2013-08-17 22:21:11 -0400 | [diff] [blame] | 190 | $(INSTALL) -D -m 644 $< $@ |
Rich Felker | d66ab4f | 2013-07-01 13:43:43 -0400 | [diff] [blame] | 191 | |
Rich Felker | ec05a0b | 2011-06-23 22:13:47 -0400 | [diff] [blame] | 192 | $(DESTDIR)$(includedir)/%: include/% |
Rich Felker | e678fc6 | 2013-08-17 22:21:11 -0400 | [diff] [blame] | 193 | $(INSTALL) -D -m 644 $< $@ |
Rich Felker | ec05a0b | 2011-06-23 22:13:47 -0400 | [diff] [blame] | 194 | |
Rich Felker | 82fa6b4 | 2013-08-16 17:51:38 -0400 | [diff] [blame] | 195 | $(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so |
Rich Felker | 9ff8ed4 | 2013-08-31 11:36:56 -0400 | [diff] [blame] | 196 | $(INSTALL) -D -l $(libdir)/libc.so $@ || true |
Rich Felker | f8e054f | 2012-05-04 21:54:57 -0400 | [diff] [blame] | 197 | |
Rich Felker | 0780936 | 2012-08-17 19:32:24 -0400 | [diff] [blame] | 198 | install-libs: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(if $(SHARED_LIBS),$(DESTDIR)$(LDSO_PATHNAME),) |
| 199 | |
| 200 | install-headers: $(ALL_INCLUDES:include/%=$(DESTDIR)$(includedir)/%) |
| 201 | |
| 202 | install-tools: $(ALL_TOOLS:tools/%=$(DESTDIR)$(bindir)/%) |
| 203 | |
Rich Felker | f807107 | 2014-06-25 16:14:37 -0400 | [diff] [blame] | 204 | musl-git-%.tar.gz: .git |
| 205 | git archive --format=tar.gz --prefix=$(patsubst %.tar.gz,%,$@)/ -o $@ $(patsubst musl-git-%.tar.gz,%,$@) |
Rich Felker | 0780936 | 2012-08-17 19:32:24 -0400 | [diff] [blame] | 206 | |
Rich Felker | f807107 | 2014-06-25 16:14:37 -0400 | [diff] [blame] | 207 | musl-%.tar.gz: .git |
| 208 | git archive --format=tar.gz --prefix=$(patsubst %.tar.gz,%,$@)/ -o $@ v$(patsubst musl-%.tar.gz,%,$@) |
Rich Felker | 0780936 | 2012-08-17 19:32:24 -0400 | [diff] [blame] | 209 | |
Rich Felker | 0780936 | 2012-08-17 19:32:24 -0400 | [diff] [blame] | 210 | .PHONY: all clean install install-libs install-headers install-tools |