1 # This file is not part of the regular Makefile.inc
2 # It is used from the LLVM build system, when compiling the passes.
4 # This files is used with gmake, so do NOT add .include "..."
6 LLVMPREFIX?=../../../../../obj_llvm.i386/Release+Asserts
8 CFLAGS += -D__MINIX -D_MINIX_SYSTEM -DDEBUG_TYPE=\""$PASSNAME"\"
9 INCLUDES += -I../../include
15 PASSLIBNAME = $(PASSNAME).so
17 LLVM_VERSION=$(shell ($(LLVMPREFIX)/bin/llvm-config --version | sed "s/[^0-9]//g"))
18 CFLAGS += -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -DHAVE_EXCEPTIONS=0
19 CFLAGS += $(shell $(LLVMPREFIX)/bin/llvm-config --cxxflags) -g -DLLVM_VERSION=$(LLVM_VERSION)
20 LDFLAGS += $(shell $(LLVMPREFIX)/bin/llvm-config --ldflags)
22 INCLUDES += -I../include
26 $(PASSLIBNAME): $(OBJS)
27 $(QUIET) $(ECHO) " [LINK] $@"
28 $(QUIET) $(CXX) $(CFLAGS) -shared -o $@ $(CPPS) $(OBJS) $(LDFLAGS) $(LIBS)
31 $(QUIET) $(ECHO) " [C++] $<"
32 $(QUIET) $(CXX) $(CFLAGS) $(INCLUDES) -c -o $@ $<
34 install: $(PASSLIBNAME)
35 $(QUIET) -mkdir -p ../../bin
36 $(QUIET) $(CP) $(PASSLIBNAME) ../../bin/$(PASSLIBNAME)
39 -rm -f $(OBJS) $(PASSLIBNAME)