CPPFLAGS += -Iinclude -Iabstraction -Ild -Iother -I.

# dropped machocheck due to compilation failures
all: rebase unwinddump dyldinfo ObjectDump ld64

libprunetrie.a: other/PruneTrie.o other/prune_trie.h
	$(AR) -s -r -c libprunetrie.a other/PruneTrie.o

ld64: libprunetrie.a ld/ld.o ld/Options.o ld/debugline.o version.o
	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^

rebase: other/rebase.o
	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^

dyldinfo: other/dyldinfo.o
	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^

unwinddump: other/unwinddump.o
	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^

ObjectDump: other/ObjectDump.o ld/debugline.o
	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^

machocheck: other/machochecker.o
	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^