#------ MAKE CHANGES TO BASE_DIR : Please put the path to base directory of your pristine gcc-4.7.2 build -----------# BASE_DIR = /home/avantika/Downloads/gcc/gccpackage INSTALL = $(BASE_DIR)/install CC = $(INSTALL)/bin/g++ NEW_PATH = $(BASE_DIR)/gcc-4.7.2/gcc #----- MAKE CHANGES TO OBJS : Add the name of your test file with extension .o (say test as test.o) --------# #------------------------------- Multiple dependent files maybe also be added ------------------------------# OBJS = test1.o GCCPLUGINS_DIR:= $(shell $(CC) -print-file-name=plugin) INCLUDE= -I$(GCCPLUGINS_DIR)/include -I$(NEW_PATH) FLAGS= -fPIC -O0 -flto -flto-partition=none %.o : %.c $(CC) $(FLAGS) $(INCLUDE) -c $< %.o : %.cpp $(CC) $(FLAGS) $(INCLUDE) -c $< plugin.so: pointsto-callstrings.o constraint.o dataflow.o $(CC) $(INCLUDE) $(FLAGS) -shared $^ -o $@ test: $(OBJS) plugin.so $(CC) -o result -flto -fplugin=./plugin.so $(OBJS) -O3 -fdump-ipa-all #test: plugin.so # $(CC) -c -flto -flto-partition=none -fplugin=./plugin.so function-pointer.c -O0 -fdump-ipa-all clean: \rm -f plugin.so *~ *.o a.out result* *.cpp.*