Diff of /pp/Makefile.in [de0c3c] .. [fb7fe6]  Maximize  Restore

  Switch to side-by-side view

--- a/pp/Makefile.in
+++ b/pp/Makefile.in
@@ -1,53 +1,56 @@
-INSTALL_LIST=oprofpp op_to_source op_time op_merge
+include ../make.common
 
-CFLAGS=@CFLAGS@ -pedantic -Wall -W -Wstrict-prototypes -Wunused -Wshadow -Wmissing-prototypes -Winline
-CXXFLAGS=@CXXFLAGS@ @BFD_CXXFLAGS@ -ansi -Wall -W -Wunused -Wmissing-prototypes
-LIBS=-lpopt -lbfd -liberty -ldl
-MY_SOURCES=oprofpp.cpp oprofpp_util.cpp
-OBJS=../events/op_events.o ../events/op_events_desc.o ../dae/opd_util.o oprofpp_util.o ../util/op_popt.o ../util/file_manip.o  ../util/string_manip.o ../util/misc.o ../libdb/libdb.a
+OPROFPP_HEADERS=oprofpp.h opf_filter.h demangle_symbol.h opp_symbol.h
+OP_TO_SOURCE_HEADERS=
+OP_TIME_HEADERS=
+OP_MERGE_HEADERS=
+HEADERS=$(OPROFPP_HEADERS) $(OP_TO_SOURCE_HEADERS) $(OP_TIME_HEADERS) $(OP_MERGE_HEADERS)
+ 
+OPROFPP_SOURCES=oprofpp.cpp oprofpp_util.cpp opp_symbol.cpp demangle_symbol.cpp
+OP_TO_SOURCE_SOURCES=opf_filter.cpp
+OP_TIME_SOURCES=op_time.cpp
+OP_MERGE_SOURCES=op_merge.cpp
+SOURCES=$(OPROFPP_SOURCES) $(OP_TO_SOURCE_SOURCES) $(OP_TIME_SOURCES) $(OP_MERGE_SOURCES)
 
-all: $(INSTALL_LIST)
+OPROFPP_OBJECTS=oprofpp.o oprofpp_util.o opf_container.o opp_symbol.o demangle_symbol.o
+OP_TO_SOURCE_OBJECTS=opf_filter.o opf_container.o demangle_symbol.o
+OP_TIME_OBJECTS=op_time.o oprofpp_util.o opf_container.o demangle_symbol.o opp_symbol.o
+OP_MERGE_OBJECTS=op_merge.o oprofpp_util.o
+OBJECTS=$(OPROFPP_OBJECTS) $(OP_TO_OBJECTS_OBJECTS) $(OP_TIME_OBJECTS) $(OP_MERGE_OBJECTS)
 
-.PHONY: all clean srcdoc install uninstall
+OPROFPP_TARGET=oprofpp
+OP_TO_SOURCE_TARGET=op_to_source
+OP_TIME_TARGET=op_time
+OP_MERGE_TARGET=op_merge
+TARGET=$(OPROFPP_TARGET) $(OP_TO_TARGET_TARGET) $(OP_TIME_TARGET) $(OP_MERGE_TARGET)
 
-clean: 
-	rm -rf *.o .deps oprofpp-src.html $(INSTALL_LIST)
+OPROFPP_LIBS=-lop -lutil++ -lutil -ldb -lpopt -lbfd -liberty -ldl
+OP_TO_SOURCE_LIBS=-lop -lutil++ -lutil -ldb -lpopt -lbfd -liberty -ldl
+OP_TIME_LIBS=-lop -lutil++ -lutil -ldb -lpopt -lbfd -liberty -ldl
+OP_MERGE_LIBS=-lop -lutil++ -lutil -ldb -lpopt -lbfd -liberty -ldl
+ 
+all: $(TARGET)
 
-install: all
-	-$(MKDIR_P) $(BINDIR)
-	for f in $(INSTALL_LIST); do \
-		cp $$f $(BINDIR)/$$f && chmod 755 $(BINDIR)/$$f; \
-	done
+INSTALL_LIST=$(TARGET)
+install:
+	$(INSTALL) $(INSTALL_LIST) $(BINDIR)
+ 
+uninstall:
+	rm -f $(INSTALL_LIST)
+ 
+clean:
+	rm -rf .deps $(OBJECTS) $(TARGET) 
 
-uninstall:
-	for f in $(INSTALL_LIST); do \
-		rm -f $(BINDIR)/$$f; \
-	done
-
-srcdoc: oprofpp-src.html
-
-oprofpp-src.html: $(MY_SOURCES)
-	../scripts/dodoc -html $(MY_SOURCES) >oprofpp-src.html
-
-oprofpp: oprofpp.o $(OBJS) opf_container.o opp_symbol.o demangle_symbol.o
-	$(CXX) $(CXXFLAGS) $^ -o $@ $(LIBS)
-
-op_to_source: opf_filter.o opf_container.o demangle_symbol.o ../util/child_reader.o $(OBJS) \
- ../util/string_manip.o
-	$(CXX) $(CXXFLAGS) $^ -o $@ $(LIBS)
-
-op_time: op_time.o $(OBJS) opf_container.o demangle_symbol.o opp_symbol.o
-	$(CXX) $(CXXFLAGS) $^ -o $@ $(LIBS)
-
-op_merge: op_merge.o $(OBJS)
-	$(CXX) $(CXXFLAGS) $^ -o $@ $(LIBS)
-
-%.o: %c
-	$(CC) -c $(CFLAGS) $(INCLUDES) -g $< -o $@
-
-%.o: %cpp
-	$(CXX) -c $(CXXFLAGS) $(INCLUDES) -g $< -o $@
-
-ALL_SOURCES = oprofpp.cpp oprofpp_util.cpp demangle_symbol.cpp opf_container.cpp opf_filter.cpp op_time.cpp op_merge.cpp opp_symbol.cpp
-
-include ../Rules.make
+$(OPROFPP_TARGET): $(OPROFPP_OBJECTS)
+	$(CXX) -o $@ $^ $(LDFLAGS) $(OPROFPP_LIBS)
+ 
+$(OP_TO_SOURCE_TARGET): $(OP_TO_SOURCE_OBJECTS)
+	$(CXX) -o $@ $^ $(LDFLAGS) $(OP_TO_SOURCE_LIBS)
+ 
+$(OP_TIME_TARGET): $(OP_TIME_OBJECTS)
+	$(CXX) -o $@ $^ $(LDFLAGS) $(OP_TIME_LIBS)
+ 
+$(OP_MERGE_TARGET): $(OP_MERGE_OBJECTS)
+	$(CXX) -o $@ $^ $(LDFLAGS) $(OP_MERGE_LIBS)
+ 
+include ../make.deps