810b914717
.gitignore, Makefile: add missing files, sort example filenames. Makefile.FLTK: update and extend FLTKCONFIG definition examples. Rename README.examples to README.txt (easier for Windows users). README.txt: minor edits, fix link, remove trailing whitespace.
37 lines
1.1 KiB
Makefile
37 lines
1.1 KiB
Makefile
#
|
|
# Stuff every FLTK application might need
|
|
#
|
|
# If you take this for use in your own project, be sure to change
|
|
# the 'FLTKCONFIG' setting to point to where it's installed
|
|
# on your system. Common examples:
|
|
#
|
|
# FLTKCONFIG = /usr/local/bin/fltk-config
|
|
# FLTKCONFIG = /usr/local/src/fltk-1.4.x/fltk-config
|
|
# FLTKCONFIG = ../build/fltk-config # if ../build == CMake build directory
|
|
#
|
|
# Set .SILENT in your Makefile if you want 'quieter' builds.
|
|
#
|
|
|
|
ifeq '$(OS)' "Windows_NT"
|
|
EXEEXT = .exe
|
|
endif
|
|
|
|
FLTKCONFIG = ../fltk-config
|
|
CXX = $(shell $(FLTKCONFIG) --cxx)
|
|
CXXFLAGS = $(shell $(FLTKCONFIG) --cxxflags) -Wall -I.
|
|
LINKFLTK = $(shell $(FLTKCONFIG) --ldstaticflags)
|
|
LINKFLTK_GL = $(shell $(FLTKCONFIG) --use-gl --ldstaticflags)
|
|
LINKFLTK_IMG = $(shell $(FLTKCONFIG) --use-images --ldstaticflags)
|
|
LINKFLTK_ALL = $(shell $(FLTKCONFIG) --use-images --use-gl --ldstaticflags)
|
|
.SUFFIXES: .cxx .h .fl .o $(EXEEXT)
|
|
|
|
# HOW TO COMPILE
|
|
.cxx.o:
|
|
@echo "*** Compile $<..."
|
|
$(CXX) -I.. $(CXXFLAGS) -c $< -o $@
|
|
|
|
# HOW TO LINK
|
|
.o$(EXEEXT):
|
|
@echo "*** Linking $@..."
|
|
$(CXX) $< $(LINKFLTK) $(LINKFLTK_IMG) -o $@
|