diff --git a/Makefile b/Makefile index 5df40f8f2..37847075b 100644 --- a/Makefile +++ b/Makefile @@ -1,49 +1,51 @@ +# +# "$Id" +# +# Top-level makefile for the Fast Light Tool Kit (FLTK). +# +# Copyright 1998 by Bill Spitzak and others. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA. +# +# Please report all bugs and problems to "fltk-bugs@easysw.com". +# + SHELL=/bin/sh -all : src fluid test -shared : srcshared fluid test -lib : SRC -src : SRC +DIRS = src fluid test -SRC : makeinclude src/makedepend - cd src && $(MAKE) -src/makedepend : - touch src/makedepend -srcshared : makeinclude src/makedepend - cd src && $(MAKE) shared +all: + for dir in $(DIRS); do\ + echo "=== making $$dir ===";\ + cd $$dir && $(MAKE);\ + done -fluid : FLUID -FLUID : makeinclude fluid/makedepend - cd fluid && $(MAKE) -fluid/makedepend : - touch fluid/makedepend +install: all + for dir in $(DIRS); do\ + echo "=== installing $$dir ===";\ + cd $$dir && $(MAKE) install;\ + done -test : TEST -TEST : makeinclude - cd test && $(MAKE) +clean: + -@ rm -f core config.cache *.o *.bck + for dir in $(DIRS); do\ + echo "=== cleaning $$dir ===";\ + cd $$dir && $(MAKE) clean;\ + done -install : SRC FLUID - cd src && $(MAKE) install - cd fluid && $(MAKE) install - -uninstall : makeinclude src/makedepend fluid/makedepend - cd src && $(MAKE) uninstall - cd fluid && $(MAKE) uninstall - -clean : - -@ rm -f *.o core *~ - cd src && $(MAKE) clean - cd fluid && $(MAKE) clean - cd test && $(MAKE) clean - -distclean : clean - -@ rm config.* makeinclude - -realclean : distclean - -include ./version -dist : - ./makedist $(VERSION).$(REVISION) - -makeinclude : - ./configure +# +# End of "$Id: Makefile,v 1.2 1998/10/20 21:06:17 mike Exp $". +# diff --git a/fluid/Makefile b/fluid/Makefile index 876b52a09..5b5afd9df 100644 --- a/fluid/Makefile +++ b/fluid/Makefile @@ -1,3 +1,28 @@ +# +# "$Id" +# +# Fluid makefile for the Fast Light Tool Kit (FLTK). +# +# Copyright 1998 by Bill Spitzak and others. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA. +# +# Please report all bugs and problems to "fltk-bugs@easysw.com". +# + PROGRAM = fluid CPPFILES = \ @@ -57,27 +82,13 @@ include makedepend install: $(PROGRAM) strip $(PROGRAM) + -mkdir -p $(bindir) cp $(PROGRAM) $(bindir)/$(PROGRAM) @chmod a+rx,g-w,o-w $(bindir)/$(PROGRAM) uninstall: -@ rm -f $(bindir)/$(PROGRAM) -################################################################ - -PROGRAM_D = $(PROGRAM)_d - -debug: $(PROGRAM_D) - -OBJECTS_D = $(CPPFILES:.C=.do) $(CFILES:.c=.do) - -.C.do : - @echo $<: - @$(CXX) -I.. $(CXXFLAGS_D) -c -o $@ $< -.c.do : - @echo $<: - @$(CC) -I.. $(CFLAGS_D) -c -o $@ $< - -$(PROGRAM_D) : $(OBJECTS_D) ../lib/$(LIBNAME_D) - @echo linking $@: - @$(CXX) $(CXXFLAGS_D) -o $(PROGRAM_D) $(OBJECTS_D) -L../lib -lfltk_d $(LDLIBS) +# +# End of "$Id: Makefile,v 1.2 1998/10/20 21:06:18 mike Exp $". +# diff --git a/src/Makefile b/src/Makefile index 72a0b60be..b15ef4990 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,3 +1,28 @@ +# +# "$Id" +# +# Library makefile for the Fast Light Tool Kit (FLTK). +# +# Copyright 1998 by Bill Spitzak and others. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA. +# +# Please report all bugs and problems to "fltk-bugs@easysw.com". +# + CPPFILES = \ Fl.C \ Fl_Adjuster.C \ @@ -126,7 +151,7 @@ OBJECTS = $(CPPFILES:.C=.o) $(CFILES:.c=.o) $(LIBRARY) : $(OBJECTS) @echo Building $(LIBRARY) - @$(AR) $(LIBRARY) $(OBJECTS) + @$(LIBCOMMAND) $(LIBRARY) $(OBJECTS) @$(RANLIB) $(LIBRARY) .C.o : @@ -147,69 +172,14 @@ include makedepend ################################################################ -LIBRARY_D = ../lib/$(LIBNAME_D) - -debug: $(LIBRARY_D) - -OBJECTS_D = $(CPPFILES:.C=.do) $(CFILES:.c=.do) - -.SUFFIXES : .C .c .o .do - -.C.do : - @echo $<: - @$(CXX) -I.. $(CXXFLAGS_D) -c -o $@ $< -.c.do : - @echo $<: - @$(CC) -I.. $(CFLAGS) -c -o $@ $< - -$(LIBRARY_D) : $(OBJECTS_D) - @echo building $(LIBRARY_D): - @$(AR) $(LIBRARY_D) $(OBJECTS_D) - @$(RANLIB) $(LIBRARY_D) - -################################################################ -# Linux-specific shared libraries: - -include ../version - -SHBASENAME = libfltk.so -SONAME = $(SHBASENAME).$(VERSION) -SHLIBNAME = $(SHBASENAME).$(VERSION).$(REVISION) -PICOBJECTS = $(CPPFILES:.C=.pic.o) $(CFILES:.c=.pic.o) - -shared: ../lib/$(SHLIBNAME) ../lib/$(SONAME) ../lib/$(SHBASENAME) - touch ../lib/$(LIBNAME) - -../lib/$(SHLIBNAME): $(PICOBJECTS) - @echo building $@: - @$(CXX) -shared -Wl,-soname,$(SONAME) $(GLDLIBS) -o $@ $(PICOBJECTS) - -../lib/$(SONAME): ../lib/$(SHLIBNAME) - ln -nsf $(SHLIBNAME) $@ - -../lib/$(SHBASENAME): ../lib/$(SHLIBNAME) - ln -nsf $(SHLIBNAME) $@ - -%.pic.o: %.C - @echo $<: - @$(CXX) -fPIC -I.. $(CXXFLAGS) -c -o $@ $< -%.pic.o: %.c - @echo $<: - @$(CC) -fPIC -I.. $(CFLAGS) -c -o $@ $< - -################################################################ - install: ../lib/$(LIBNAME) + -mkdir -p $(libdir) cp -f ../lib/$(LIBNAME) $(libdir) - -cp -f ../lib/$(SHLIBNAME) $(libdir) @chmod a+r,u+w,g-w,o-w $(libdir)/$(LIBNAME)* + -mkdir -p $(includedir) cp -rf ../FL $(includedir) @chmod -R a+r,u+w,g-w,o-w $(includedir)/FL -# it used to do this, but it was recommended that I take it out -# @chown root $(libdir)/$(LIBNAME)* -# @chown -R root $(includedir)/FL - -uninstall: - -@ rm -f $(libdir)/libfltk* - -@ rm -rf $(includedir)/FL +# +# End of "$Id: Makefile,v 1.3 1998/10/20 21:06:18 mike Exp $". +# diff --git a/test/Makefile b/test/Makefile index 102ecf8bc..5decf1a6c 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,3 +1,28 @@ +# +# "$Id" +# +# Test/example program makefile for the Fast Light Tool Kit (FLTK). +# +# Copyright 1998 by Bill Spitzak and others. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA. +# +# Please report all bugs and problems to "fltk-bugs@easysw.com". +# + ALL = adjuster arc ask bitmap boxtype browser button buttons checkers \ clock colbrowser color_chooser cube cursor curve demo doublebuffer \ file_chooser fonts forms fractals fullscreen gl_overlay glpuzzle \ @@ -49,3 +74,7 @@ jpeg_image: jpeg_image.C clean: -@ rm -f ${ALL} jpeg_image *.o core *~ + +# +# End of "$Id: Makefile,v 1.3 1998/10/20 21:06:19 mike Exp $". +#