diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2024-11-26 16:03:07 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2024-11-26 16:12:07 +0100 |
| commit | 9bac964f85503dfd37cef369f4d664a1aef92094 (patch) | |
| tree | 5647eb3036b87ec2e9033c24e5647fb41acef933 /documentation/src | |
| parent | 2430cb1f4280a8dd58bb6ad8a6099c223f4e6004 (diff) | |
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.
Diffstat (limited to 'documentation/src')
| -rw-r--r-- | documentation/src/basics.dox | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/documentation/src/basics.dox b/documentation/src/basics.dox index 8e6a350fd..78e7858dd 100644 --- a/documentation/src/basics.dox +++ b/documentation/src/basics.dox @@ -453,24 +453,27 @@ LDSTATIC = $(shell fltk-config --use-gl --use-images --ldstaticflags ) LINK = $(CXX) TARGET = cube -OBJS = CubeMain.o CubeView.o CubeViewUI.o -SRCS = CubeMain.cxx CubeView.cxx CubeViewUI.cxx +OBJS = CubeMain.o CubeView.o CubeViewUI.o +SRCS = CubeMain.cxx CubeView.cxx CubeViewUI.cxx .SUFFIXES: .o .cxx + %.o: %.cxx - $(CXX) $(CXXFLAGS) $(DEBUG) -c $< + $(CXX) $(CXXFLAGS) $(DEBUG) -c $< all: $(TARGET) - $(LINK) -o $(TARGET) $(OBJS) $(LDSTATIC) $(TARGET): $(OBJS) -CubeMain.o: CubeMain.cxx CubeViewUI.h -CubeView.o: CubeView.cxx CubeView.h CubeViewUI.h + $(LINK) -o $(TARGET) $(OBJS) $(LDSTATIC) + +CubeMain.o: CubeMain.cxx CubeViewUI.h +CubeView.o: CubeView.cxx CubeView.h CubeViewUI.h CubeViewUI.o: CubeViewUI.cxx CubeView.h -clean: $(TARGET) $(OBJS) - rm -f *.o 2> /dev/null - rm -f $(TARGET) 2> /dev/null +clean: + rm -f *.o 2> /dev/null + rm -f $(TARGET) 2> /dev/null + \endcode \subsection basics_visual_cpp Compiling Programs with Microsoft Visual C++ |
