should all build now

This commit is contained in:
Sean C. Rhea
2006-09-07 00:54:53 +00:00
parent e345a93cbc
commit d92c5fcb42
7 changed files with 113 additions and 22 deletions

31
Makefile Normal file
View File

@@ -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

31
src/Makefile Normal file
View File

@@ -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

View File

@@ -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

View File

@@ -23,7 +23,7 @@
#include <QtGui>
extern "C" {
#include "../pt.h"
#include "pt.h"
}
class MainWindow;

View File

@@ -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

View File

@@ -21,7 +21,7 @@
#include "RawFile.h"
#include <QMessageBox>
extern "C" {
#include "../pt.h"
#include "pt.h"
}
struct RawFileReadState

33
src/lib/Makefile Normal file
View File

@@ -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 $@ $^