Skip to content
Snippets Groups Projects
Makefile.in 1.16 KiB
Newer Older
jdh8d's avatar
jdh8d committed


PROGS=selective_cfi.exe

jdh8d's avatar
jdh8d committed
INCLUDE=-I. -I../include -I../xform -I../../beaengine/include -I../../libIRDB/include/ -I../../libMEDSannotation/include/ -I../libtransform/include/ -I../transforms
jdh8d's avatar
jdh8d committed
CXXFLAGS= @EXTRA_CXXFLAGS@ $(INCLUDE) 
jdh8d's avatar
jdh8d committed
LIBS=-L../../lib -lxform -lIRDB-core -lIRDB-cfg -lBeaEngine_s_d -lpqxx  -lMEDSannotation -ltransform ../transforms/Rewrite_Utility.o -lpq
jdh8d's avatar
jdh8d committed


OBJS=scfi_driver.o scfi_instr.o
programs=selective_cfi.exe

.SUFFIXES: .o .c .exe .cpp .hpp

all: $(programs)
jdh8d's avatar
jdh8d committed
	@echo "---------------------------------------------"
	@echo "- Selective CFI directory -- Build complete -"
	@echo "---------------------------------------------"
jdh8d's avatar
jdh8d committed


-include $(OBJS:.o=.d)

%.o: %.cpp
	$(CXX) -c  $(CXXFLAGS) $*.cpp 
	@#
	@# build dependencies --  http://scottmcpeak.com/autodepend/autodepend.html
	@#
jdh8d's avatar
jdh8d committed
	@cpp -MM $(CXXFLAGS) $*.cpp > $*.d 2> /dev/null || true		# might fail on solaris with CXX=sun's CC.
jdh8d's avatar
jdh8d committed
	@cp -f $*.d $*.d.tmp
	@sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
	@rm -f $*.d.tmp
	
clean:
	rm -f *.o core *.exe

$(programs): ../../lib/*.a

selective_cfi.exe:   $(OBJS)
	$(CXX) $(CXXFLAGS) $^ $(INCLUDE) $(LIBS) -o $@