From d92c5fcb429e5d359742471051c4150bdda9e540 Mon Sep 17 00:00:00 2001 From: "Sean C. Rhea" Date: Thu, 7 Sep 2006 00:54:53 +0000 Subject: [PATCH] should all build now --- Makefile | 31 +++++++++++++++++++++++++++++++ src/Makefile | 31 +++++++++++++++++++++++++++++++ src/cmd/Makefile | 31 ++++++++++++++----------------- src/gui/DownloadRideDialog.h | 2 +- src/gui/GoldenCheetah.pro | 5 ++--- src/gui/RawFile.cpp | 2 +- src/lib/Makefile | 33 +++++++++++++++++++++++++++++++++ 7 files changed, 113 insertions(+), 22 deletions(-) create mode 100644 Makefile create mode 100644 src/Makefile create mode 100644 src/lib/Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..159a84efc --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +# +# $Id: Makefile,v 1.11 2006/09/06 23:23:03 srhea Exp $ +# +# Copyright (c) 2006 Sean C. Rhea (srhea@srhea.net) +# +# 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. +# +# 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., 51 +# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# + +SUBDIRS=doc src + +all: subdirs +.PHONY: all subdirs clean + +clean: + @for dir in $(SUBDIRS); do $(MAKE) -wC $$dir clean; done + +subdirs: + @for dir in $(SUBDIRS); do $(MAKE) -wC $$dir; done + diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 000000000..72f5fcec2 --- /dev/null +++ b/src/Makefile @@ -0,0 +1,31 @@ +# +# $Id: Makefile,v 1.11 2006/09/06 23:23:03 srhea Exp $ +# +# Copyright (c) 2006 Sean C. Rhea (srhea@srhea.net) +# +# 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. +# +# 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., 51 +# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# + +SUBDIRS=lib cmd gui # order is important! + +all: subdirs +.PHONY: all subdirs clean + +clean: + @for dir in $(SUBDIRS); do $(MAKE) -wC $$dir clean; done + +subdirs: + @for dir in $(SUBDIRS); do $(MAKE) -wC $$dir; done + diff --git a/src/cmd/Makefile b/src/cmd/Makefile index 64b14ecd8..3ab517ffa 100644 --- a/src/cmd/Makefile +++ b/src/cmd/Makefile @@ -20,34 +20,31 @@ CC=gcc CFLAGS=-g -W -Wall -Werror -ansi -pedantic -CXXFLAGS=-g -W -Wall -Werror +CMDS=ptdl ptpk ptunpk cpint +LIBS=../lib/libgc.a +INCLUDES=-I../lib -all: ptdl ptpk ptunpk cpint subdirs -.PHONY: all clean subdirs +all: $(CMDS) +.PHONY: all clean clean: - rm -f *.o ptdl ptpk ptunpk cpint - $(MAKE) -wC gui clean + rm -f *.o $(CMDS) -subdirs: - @if test -d gui; \ - then \ - if ! test -f gui/Makefile; then cd gui; qmake; cd -; fi; \ - $(MAKE) -wC gui; \ - fi +%.o: %.c + $(CC) -c $(CFLAGS) $(INCLUDES) $< -cpint: cpint-cmd.o cpint.o pt.o +cpint: cpint.o $(LIBS) $(CXX) -o $@ $^ -ptdl: ptdl.o pt.o +ptdl: ptdl.o $(LIBS) $(CC) -o $@ $^ -ptunpk: ptunpk.o pt.o +ptunpk: ptunpk.o $(LIBS) $(CC) -o $@ $^ -ptpk: ptpk.o pt.o +ptpk: ptpk.o $(LIBS) $(CC) -o $@ $^ -ptdl.o: pt.h -ptunpk.o: pt.h +ptdl.o: ../lib/pt.h +ptunpk.o: ../lib/pt.h diff --git a/src/gui/DownloadRideDialog.h b/src/gui/DownloadRideDialog.h index 3b8d892a5..20d33a8ac 100644 --- a/src/gui/DownloadRideDialog.h +++ b/src/gui/DownloadRideDialog.h @@ -23,7 +23,7 @@ #include extern "C" { -#include "../pt.h" +#include "pt.h" } class MainWindow; diff --git a/src/gui/GoldenCheetah.pro b/src/gui/GoldenCheetah.pro index 408976efc..23fdd273e 100644 --- a/src/gui/GoldenCheetah.pro +++ b/src/gui/GoldenCheetah.pro @@ -5,10 +5,9 @@ TEMPLATE = app TARGET += DEPENDPATH += . -INCLUDEPATH += ../qwt-20060130/include +INCLUDEPATH += /usr/local/include/qwt ../lib CONFIG += static -OBJECTS += ../pt.o -LIBS += /usr/local/lib/libqwt.a +LIBS += /usr/local/lib/libqwt.a ../lib/libgc.a LIBS += -lz -framework Carbon # Input diff --git a/src/gui/RawFile.cpp b/src/gui/RawFile.cpp index b03d077ad..0c27e38a5 100644 --- a/src/gui/RawFile.cpp +++ b/src/gui/RawFile.cpp @@ -21,7 +21,7 @@ #include "RawFile.h" #include extern "C" { -#include "../pt.h" +#include "pt.h" } struct RawFileReadState diff --git a/src/lib/Makefile b/src/lib/Makefile new file mode 100644 index 000000000..dbf6b02a4 --- /dev/null +++ b/src/lib/Makefile @@ -0,0 +1,33 @@ +# +# $Id: Makefile,v 1.11 2006/09/06 23:23:03 srhea Exp $ +# +# Copyright (c) 2006 Sean C. Rhea (srhea@srhea.net) +# +# 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. +# +# 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., 51 +# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# + +CC=gcc +CFLAGS=-g -W -Wall -Werror -ansi -pedantic +LIBTOOL=libtool + +all: libgc.a +.PHONY: all clean + +clean: + rm -f *.o libgc.a + +libgc.a: pt.o cpint.o + $(LIBTOOL) -static -o $@ $^ +