User forums > Using Code::Blocks

Help Using Makefiles

<< < (2/2)

stahta01:
Fix the targets; so they match.

What are the target/tasks in your makefile?

Tim S

laserbeak43:
this is open source, so i guess i can just leave the license intact and show you the makefile. The file structure is the same as SVN so everything should match.(sorry I really don't know much about makefiles even though i have used them in the past, i find them confusing.)

--- Code: ---#
# jMax
# Copyright (C) 1994, 1995, 1998, 1999 by IRCAM-Centre Georges Pompidou, Paris, France.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# See file LICENSE for further informations on licensing terms.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
# Based on Max/ISPW by Miller Puckette.
#
# Authors: Maurizio De Cecco, Francois Dechelle, Enzo Maggi, Norbert Schnell.
#

include ./core/Makefiles/Makefile.config

default:
+make MODE=debug BUILDDIR="~/tmp/jmax/build" DISTDIR="~/distrib/jmax/" clean clobber tar

all: core packages docs

core:
(cd core; $(MAKE) all)

packages:
(cd packages; $(MAKE) all)

docs:
(cd docs; $(MAKE) distrib)

REV = $(shell "svnversion" | sed "s/:/./")

tar: all
(cd $(DISTDIR)/.. ; tar cvzf jmax.$(shell uname -s).$(shell uname -m).r$(REV).tgz --exclude=".svn" jmax)

clean:
/bin/rm -rf $(BUILDDIR)

clobber: clean
/bin/rm -rf $(DISTDIR)

test:
echo No test implemented yet

tags:
(find . \! \( -name '*~' \) \( -name "*.c" -o -name "*.h" -o -name "*.java" -o -name "Makefile.*" -o -name "Makefile" -o -name "*.tcl" \) -print | etags - )


tags-test:
find . \! \( -name '*~' \) \( -name "*.c" -o -name "*.h" -o -name "*.java" -o -name "Makefile.*" -o -name "Makefile" -o -name "*.tcl" \) -print

.PHONY: tags
.PHONY: tar
.PHONY: all
.PHONY: core
.PHONY: docs
.PHONY: packages
.PHONY: clean
.PHONY: clobber

--- End code ---

stahta01:
The target "all" exists in makefile will use that

"Project" -> "Properties"
Tab "Build Targets"

Select the best target for building; I normally use "release"
Click on "rename" change the name to makefile target name of "all".

Note: I usually delete all the targets but the one I renamed to "all".
But, I have never used this for a medium or larger project.

Then try to build it again.

Tim S

Navigation

[0] Message Index

[*] Previous page

Go to full version