老实说,我对以下代码的理解相当有限。但是,据我所知,它应该创建某种可执行文件,以便我可以“测试”该程序。但我要么不确定可执行文件的外观,要么不确定如何运行它。或者有些东西不工作。makefile 所做的只是创建一个 testBSTree.o,我真的不知道如何处理该文件。
# Makefile
# a makefile for the stack example.
#
# SHELL = /bin/sh
# TOP = .
# CURRENT_DIR = .
# CPP = /lib/cpp $(STD_CPP_DEFINES)
CXX = g++
# CCOPTIONS =
# CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
# RM_CMD = $(RM) *.o core
SRCS= testBSTree.cpp \
BSTree2.cpp
OBJS= testBSTree.o \
BSTree2.o
testBSTree.o: BSTree2.h
BSTree2.o: BSTree2.h #?
#link.o: link.h #?
PROGRAMS = testBSTree
all:: $(PROGRAMS)
testBSTree: $(OBJS)
$(CXX) -o $@ $(OBJS)
#$(CXX) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS)
clean::
$(RM) testBSTree
latex::
latex BSTree2.tex
###########################################################################
# common rules for all Makefiles - do not edit
emptyrule::
clean::
rm *.o
任何帮助将不胜感激。谢谢!