Print this page
Commonize demangle test pieces; allow for running specific tests and test cases; use linker sets to simplify test definition

*** 14,70 **** # Copyright 2019 Joyent, Inc. # include $(SRC)/Makefile.master include $(SRC)/cmd/Makefile.cmd include $(SRC)/test/Makefile.com ROOTBINDIR = $(ROOTOPTPKG)/bin ! PROG = gcc-libstdc++ llvm-stdcxxabi afl-fast rust ROOTOPTPKG = $(ROOT)/opt/util-tests TESTDIR = $(ROOTOPTPKG)/tests/demangle CMDS = $(PROG:%=$(TESTDIR)/%) $(CMDS) := FILEMODE = 0555 ! OBJS = $(PROG:%=%.o) SRCS = $(OBJS:%.o=%.c) CSTD = $(CSTD_GNU99) ! LDLIBS += -ldemangle-sys ! rust := LDLIBS += -lumem all: $(PROG) ! gcc-libstdc++: gcc-libstdc++.o ! $(LINK.c) -o $@ gcc-libstdc++.o $(LDLIBS) $(POST_PROCESS) ! llvm-stdcxxabi: llvm-stdcxxabi.o ! $(LINK.c) -o $@ llvm-stdcxxabi.o $(LDLIBS) $(POST_PROCESS) - afl-fast: afl-fast.o - $(LINK.c) -o $@ afl-fast.o $(LDLIBS) - $(POST_PROCESS) - - rust: rust.o - $(LINK.c) -o $@ rust.o $(LDLIBS) - $(POST_PROCESS) - install: all $(CMDS) - lint: - clobber: clean -$(RM) $(PROG) clean: ! -$(RM) $(OBJS) $(CMDS): $(TESTDIR) $(PROG) $(ROOTBINDIR): $(INS.dir) --- 14,68 ---- # Copyright 2019 Joyent, Inc. # include $(SRC)/Makefile.master include $(SRC)/cmd/Makefile.cmd + include $(SRC)/cmd/Makefile.ctf include $(SRC)/test/Makefile.com ROOTBINDIR = $(ROOTOPTPKG)/bin ! PROG = cxx rust + OBJS_common = main.o + OBJS_rust = rust.o + OBJS_cxx = afl-fast.o gcc-libstdc++.o llvm-stdcxxabi.o + ROOTOPTPKG = $(ROOT)/opt/util-tests TESTDIR = $(ROOTOPTPKG)/tests/demangle CMDS = $(PROG:%=$(TESTDIR)/%) $(CMDS) := FILEMODE = 0555 ! cxx := OBJS = $(OBJS_common) $(OBJS_cxx) ! rust := OBJS = $(OBJS_common) $(OBJS_cxx) ! ! $(OBJS_rust) $(OBJS_cxx) := SMATCH = off ! SRCS = $(OBJS:%.o=%.c) CSTD = $(CSTD_GNU99) ! LDLIBS += -ldemangle-sys -lumem all: $(PROG) ! cxx: $(OBJS_common) $(OBJS_cxx) ! $(LINK.c) -o $@ $(OBJS_common) $(OBJS_cxx) $(LDLIBS) $(POST_PROCESS) ! rust: $(OBJS_rust) ! $(LINK.c) -o $@ $(OBJS_common) $(OBJS_rust) $(LDLIBS) $(POST_PROCESS) install: all $(CMDS) clobber: clean -$(RM) $(PROG) clean: ! -$(RM) $(OBJ_common) $(OBJS_cxx) $(OBJS_rust) $(CMDS): $(TESTDIR) $(PROG) $(ROOTBINDIR): $(INS.dir)