14226f635SJason King# 24226f635SJason King# This file and its contents are supplied under the terms of the 34226f635SJason King# Common Development and Distribution License ("CDDL"), version 1.0. 44226f635SJason King# You may only use this file in accordance with the terms of version 54226f635SJason King# 1.0 of the CDDL. 64226f635SJason King# 74226f635SJason King# A full copy of the text of the CDDL should have accompanied this 84226f635SJason King# source. A copy of the CDDL is also available via the Internet at 94226f635SJason King# http://www.illumos.org/license/CDDL. 104226f635SJason King# 114226f635SJason King 124226f635SJason King# 134226f635SJason King# Copyright 2018 Jason King. 14*6a6cfa5dSJason King# Copyright 2019 Joyent, Inc. 154226f635SJason King# 164226f635SJason King 174226f635SJason Kinginclude $(SRC)/Makefile.master 184226f635SJason Kinginclude $(SRC)/cmd/Makefile.cmd 194226f635SJason Kinginclude $(SRC)/test/Makefile.com 204226f635SJason King 214226f635SJason KingROOTBINDIR = $(ROOTOPTPKG)/bin 224226f635SJason King 23*6a6cfa5dSJason KingPROG = gcc-libstdc++ llvm-stdcxxabi afl-fast rust 244226f635SJason King 254226f635SJason KingROOTOPTPKG = $(ROOT)/opt/util-tests 264226f635SJason KingTESTDIR = $(ROOTOPTPKG)/tests/demangle 274226f635SJason King 284226f635SJason KingCMDS = $(PROG:%=$(TESTDIR)/%) 294226f635SJason King$(CMDS) := FILEMODE = 0555 304226f635SJason King 314226f635SJason KingOBJS = $(PROG:%=%.o) 324226f635SJason KingSRCS = $(OBJS:%.o=%.c) 334226f635SJason King 344226f635SJason KingCSTD = $(CSTD_GNU99) 354226f635SJason King 364226f635SJason KingLDLIBS += -ldemangle-sys 37*6a6cfa5dSJason Kingrust := LDLIBS += -lumem 384226f635SJason King 394226f635SJason Kingall: $(PROG) 404226f635SJason King 414226f635SJason Kinggcc-libstdc++: gcc-libstdc++.o 424226f635SJason King $(LINK.c) -o $@ gcc-libstdc++.o $(LDLIBS) 434226f635SJason King $(POST_PROCESS) 444226f635SJason King 454226f635SJason Kingllvm-stdcxxabi: llvm-stdcxxabi.o 464226f635SJason King $(LINK.c) -o $@ llvm-stdcxxabi.o $(LDLIBS) 474226f635SJason King $(POST_PROCESS) 484226f635SJason King 494226f635SJason Kingafl-fast: afl-fast.o 504226f635SJason King $(LINK.c) -o $@ afl-fast.o $(LDLIBS) 514226f635SJason King $(POST_PROCESS) 524226f635SJason King 53*6a6cfa5dSJason Kingrust: rust.o 54*6a6cfa5dSJason King $(LINK.c) -o $@ rust.o $(LDLIBS) 55*6a6cfa5dSJason King $(POST_PROCESS) 56*6a6cfa5dSJason King 574226f635SJason Kinginstall: all $(CMDS) 584226f635SJason King 594226f635SJason Kinglint: 604226f635SJason King 614226f635SJason Kingclobber: clean 624226f635SJason King -$(RM) $(PROG) 634226f635SJason King 644226f635SJason Kingclean: 654226f635SJason King -$(RM) $(OBJS) 664226f635SJason King 674226f635SJason King$(CMDS): $(TESTDIR) $(PROG) 684226f635SJason King 694226f635SJason King$(ROOTBINDIR): 704226f635SJason King $(INS.dir) 714226f635SJason King 724226f635SJason King$(ROOTBINDIR)/%: % 734226f635SJason King $(INS.file) 744226f635SJason King 754226f635SJason King$(TESTDIR): 764226f635SJason King $(INS.dir) 774226f635SJason King 784226f635SJason King$(TESTDIR)/%: % 794226f635SJason King $(INS.file) 80