blob: 4dc4fa3d5d4229c3b0f4d3024e0ddf7acb0a6635 [file] [log] [blame] [edit]
##===- test/Programs/Makefile.dummylib ---------------------*- Makefile -*-===##
#
# This makefile fragment is to be used by program tests which require the
# program to be linked with libdummy. The output program is named:
# Output/$(PROG).lib.bc
#
##===----------------------------------------------------------------------===##
# DUMMYLIB - The path to the library of stub functions which is used to resolve
# external functions for dsanalysis.
#
DUMMYLIB := $(DESTLIBBYTECODE)/libdummy.bc
DUMMYSRC := $(LEVEL)/runtime/libdummy
# Rebuild dummylib if necessary...
$(DUMMYLIB) : $(wildcard $(DUMMYSRC)/*.c)
cd $(DUMMYSRC); $(MAKE)
# LINKED_PROGS - All of the programs linked to libdummy
LINKED_PROGS := $(PROGRAMS_TO_TEST:%=Output/%.lib.bc)
$(LINKED_PROGS): Output/%.lib.bc: Output/%.llvm.bc $(DUMMYLIB)
$(LLINK) $< $(DUMMYLIB) | $(LOPT) -funcresolve -internalize -globaldce > $@