mirror of
https://github.com/rui314/mold.git
synced 2024-11-11 05:46:58 +03:00
30 lines
744 B
Makefile
30 lines
744 B
Makefile
CC=clang
|
|
CXX=clang++
|
|
|
|
CURRENT_DIR=$(shell pwd)
|
|
TBB_LIBDIR=$(wildcard $(CURRENT_DIR)/oneTBB/build/linux_intel64_*_release/)
|
|
|
|
CPPFLAGS=-g -IoneTBB/include -pthread -std=c++20 -Wno-deprecated-volatile -Wno-switch -O2
|
|
LDFLAGS=-L$(TBB_LIBDIR) -Wl,-rpath=$(TBB_LIBDIR) -fuse-ld=lld -pthread
|
|
LIBS=-ltbb -ltbbmalloc -ltbbmalloc_proxy
|
|
OBJS=main.o object_file.o input_sections.o output_chunks.o mapfile.o perf.o \
|
|
linker_script.o archive_file.o sha1.o output_file.o subprocess.o
|
|
|
|
mold: $(OBJS)
|
|
$(CXX) $(CFLAGS) $(OBJS) -o $@ $(LDFLAGS) $(LIBS)
|
|
|
|
$(OBJS): mold.h elf.h Makefile
|
|
|
|
submodules: intel_tbb
|
|
|
|
intel_tbb:
|
|
$(MAKE) -C oneTBB
|
|
|
|
test: mold
|
|
(cd test; for i in *.sh; do ./$$i || exit 1; done)
|
|
|
|
clean:
|
|
rm -f *.o *~ mold
|
|
|
|
.PHONY: intel_tbb test clean
|