mirror of
https://github.com/fltk/fltk.git
synced 2026-05-30 13:05:35 +08:00
Fix Makefile example in chapter "FLTK Basics"
- move linker rule from 'all' to '$(TARGET)' - remove '$(TARGET) $(OBJS)' from rule 'clean' The 'clean' rule required to build everything before it was deleted which was obviously not intended.
This commit is contained in:
@@ -457,20 +457,23 @@ OBJS = CubeMain.o CubeView.o CubeViewUI.o
|
|||||||
SRCS = CubeMain.cxx CubeView.cxx CubeViewUI.cxx
|
SRCS = CubeMain.cxx CubeView.cxx CubeViewUI.cxx
|
||||||
|
|
||||||
.SUFFIXES: .o .cxx
|
.SUFFIXES: .o .cxx
|
||||||
|
|
||||||
%.o: %.cxx
|
%.o: %.cxx
|
||||||
$(CXX) $(CXXFLAGS) $(DEBUG) -c $<
|
$(CXX) $(CXXFLAGS) $(DEBUG) -c $<
|
||||||
|
|
||||||
all: $(TARGET)
|
all: $(TARGET)
|
||||||
$(LINK) -o $(TARGET) $(OBJS) $(LDSTATIC)
|
|
||||||
|
|
||||||
$(TARGET): $(OBJS)
|
$(TARGET): $(OBJS)
|
||||||
|
$(LINK) -o $(TARGET) $(OBJS) $(LDSTATIC)
|
||||||
|
|
||||||
CubeMain.o: CubeMain.cxx CubeViewUI.h
|
CubeMain.o: CubeMain.cxx CubeViewUI.h
|
||||||
CubeView.o: CubeView.cxx CubeView.h CubeViewUI.h
|
CubeView.o: CubeView.cxx CubeView.h CubeViewUI.h
|
||||||
CubeViewUI.o: CubeViewUI.cxx CubeView.h
|
CubeViewUI.o: CubeViewUI.cxx CubeView.h
|
||||||
|
|
||||||
clean: $(TARGET) $(OBJS)
|
clean:
|
||||||
rm -f *.o 2> /dev/null
|
rm -f *.o 2> /dev/null
|
||||||
rm -f $(TARGET) 2> /dev/null
|
rm -f $(TARGET) 2> /dev/null
|
||||||
|
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\subsection basics_visual_cpp Compiling Programs with Microsoft Visual C++
|
\subsection basics_visual_cpp Compiling Programs with Microsoft Visual C++
|
||||||
|
|||||||
Reference in New Issue
Block a user