Changeset 15931


Ignore:
Timestamp:
2008-06-09T15:22:41+12:00 (16 years ago)
Author:
mdewsnip
Message:

Tidied up the "db2txt" and "txt2db" makefiles.

Location:
gsdl/trunk/src/gdbmedit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/src/gdbmedit/db2txt/Makefile.in

    r15912 r15931  
    11###########################################################################
    22#
    3 # Makefile -- Makefile for db2txt
     3# Makefile -- src/gdbmedit/db2txt
    44# A component of the Greenstone digital library software
    55# from the New Zealand Digital Library Project at the
    66# University of Waikato, New Zealand.
    77#
    8 # Copyright (C) 1999 Rodger McNab, Stefan Boddie
     8# Copyright (C) 1999-2008  The New Zealand Digital Library Project
    99#
    1010#
     
    2323# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    2424#
    25 #       @(#)Makefile.in 1.3 16 Mar 1994
    26 #
    2725###########################################################################
    2826
    29  
    30 AR = ar
    31 CC = @CC@
     27GSDL_DIR = ../../..
     28
     29
    3230CXX = @CXX@
    33 CFLAGS = -Wall @CFLAGS@ @COMPAT32BITFLAGS@
    34 CXXFLAGS= -Wall @CXXFLAGS@ @COMPAT32BITFLAGS@
     31CXXFLAGS = @CXXFLAGS@ @COMPAT32BITFLAGS@
    3532DEFS = @DEFS@
    36 RANLIB = @RANLIB@
    37 INCLUDES = -I../../lib @GDBM_INCLUDE@
     33GSDLOS = @gsdlos@
     34INCLUDES = @GDBM_INCLUDE@ -I$(GSDL_DIR)/src/lib
     35INSTALL = @INSTALL@
    3836LDFLAGS = @LDFLAGS@ @COMPAT32BITFLAGS@
    39 DPLIBS =
    4037LIBS = @GDBM_LIBPATH@ -lgdbm @LIBS@
    41 GSDLOS = @gsdlos@
    42 INSTALL = @INSTALL@
    43  
    44 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
    45 CXXCOMPILE = $(CXX) -c $(DEFS) $(INCLUDES) $(CXXFLAGS)
    46 LINK = $(CC) $(LDFLAGS) -o $@
     38
     39
     40CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
    4741CXXLINK = $(CXX) $(LDFLAGS) -o $@
    48  
     42
     43
    4944.SUFFIXES:
    50 .SUFFIXES: .c .o
    51 .c.o:
    52     $(COMPILE) $<
    53 
    5445.SUFFIXES: .cpp .o
    5546.cpp.o:
    5647    $(CXXCOMPILE) $<
    57  
    5848
    59 HEADERS =
    6049
    61 SOURCES = db2txt.cpp
     50SOURCES = \
     51    db2txt.cpp
    6252
    63 OBJECTS = db2txt.o
     53OBJECTS = \
     54    db2txt.o \
    6455
    65 EXEC    = db2txt
    66  
    67 all : $(EXEC)
     56EXECUTABLE_OBJECTS = \
     57    $(OBJECTS)
    6858
    69 install: $(EXEC)
    70     $(INSTALL) -d ../../../bin/$(GSDLOS)
    71     $(INSTALL) -m 755 -s $(EXEC) ../../../bin/$(GSDLOS)
     59EXECUTABLE = db2txt
     60
     61
     62# Default target: make the db2txt executable
     63all: $(EXECUTABLE)
     64
     65db2txt: $(EXECUTABLE_OBJECTS)
     66    $(CXXLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
     67
     68install: $(EXECUTABLE)
     69    $(INSTALL) -d $(GSDL_DIR)/bin/$(GSDLOS)
     70    $(INSTALL) -m 755 -s $(EXECUTABLE) $(GSDL_DIR)/bin/$(GSDLOS)
     71
     72clean:
     73    rm -f $(OBJECTS) $(EXECUTABLE)
    7274
    7375distclean:
    74     rm -f $(OBJECTS) $(EXEC) Makefile
    75 
    76 clean:
    77     rm -f $(OBJECTS) $(EXEC)
     76    rm -f $(OBJECTS) $(EXECUTABLE) Makefile
    7877
    7978depend:
    80     makedepend -Y -- $(DEFS) $(INCLUDES) $(CFLAGS) -- $(SOURCES)
    81 
    82 
    83 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
    84 
    85 DB2TXT_OBJS = db2txt.o
    86 
    87 db2txt: $(DB2TXT_OBJS) $(DPLIBS)
    88     $(CXXLINK) $(DB2TXT_OBJS) $(LIBS)
     79    makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
  • gsdl/trunk/src/gdbmedit/txt2db/Makefile.in

    r15912 r15931  
    11###########################################################################
    22#
    3 # Makefile -- Makefile for txt2db
     3# Makefile -- src/gdbmedit/txt2db
    44# A component of the Greenstone digital library software
    55# from the New Zealand Digital Library Project at the
    66# University of Waikato, New Zealand.
    77#
    8 # Copyright (C) 1999 Rodger McNab, Stefan Boddie
     8# Copyright (C) 1999-2008  The New Zealand Digital Library Project
     9#
    910#
    1011# This program is free software; you can redistribute it and/or modify
     
    2223# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    2324#
    24 #       @(#)Makefile.in 1.3 16 Mar 1994
    25 #
    2625###########################################################################
    2726
    28  
    29 AR = ar
    30 CC = @CC@
     27GSDL_DIR = ../../..
     28INDEXERS_DIR = $(GSDL_DIR)/indexers
     29
     30
    3131CXX = @CXX@
    32 CFLAGS = -Wall @CFLAGS@ @COMPAT32BITFLAGS@
    33 CXXFLAGS = -Wall @CXXFLAGS@ @COMPAT32BITFLAGS@
     32CXXFLAGS = @CXXFLAGS@ @COMPAT32BITFLAGS@
    3433DEFS = @DEFS@
    35 RANLIB = @RANLIB@
    36 INCLUDES = -I../../lib @GDBM_INCLUDE@
    37 LDFLAGS = @LDFLAGS@ @COMPAT32BITFLAGS@
    38 INDEXERS_DIR=../../../indexers
    39 DPLIBS = ../../lib/gsdllib.a $(INDEXERS_DIR)/mg/lib/unitool.o
    40 LIBS = ../../lib/gsdllib.a $(INDEXERS_DIR)/mg/lib/unitool.o @GDBM_LIBPATH@ -lgdbm @LIBS@
    4134GSDLOS = @gsdlos@
     35INCLUDES = @GDBM_INCLUDE@ -I$(GSDL_DIR)/src/lib
    4236INSTALL = @INSTALL@
    43  
    44 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
    45 CXXCOMPILE = $(CXX) -c $(DEFS) $(INCLUDES) $(CXXFLAGS)
    46 MCOMPILE = ../../../bin/linux/mico-c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c
    47 LINK = $(CC) $(LDFLAGS) -o $@
    48 MLINK = ../../../bin/linux/mico-ld $(LDFLAGS) -lmico2.2.7 -o $@
     37LDFLAGS = @LDFLAGS@ @COMPAT32BITFLAGS@
     38LIBS = @GDBM_LIBPATH@ -lgdbm @LIBS@
     39
     40
     41CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
    4942CXXLINK = $(CXX) $(LDFLAGS) -o $@
    50  
     43
     44
    5145.SUFFIXES:
    52 .SUFFIXES: .c .o
    53 .c.o:
    54     $(COMPILE) $<
    55 
    5646.SUFFIXES: .cpp .o
    5747.cpp.o:
    5848    $(CXXCOMPILE) $<
    59  
    60 .SUFFIXES: .mpp .o
    61 .mpp.o:
    62     $(MCOMPILE) $<
    6349
    64 HEADERS =
    6550
    66 SOURCES = txt2db.cpp
     51SOURCES = \
     52    txt2db.cpp
    6753
    68 OBJECTS = txt2db.o
     54OBJECTS = \
     55    txt2db.o \
    6956
    70 EXEC    = txt2db
    71  
    72 all : $(EXEC)
     57GSDL_LIBS = \
     58    $(GSDL_DIR)/src/lib/gsdllib.a \
     59    $(INDEXERS_DIR)/mg/lib/libmglib.a
    7360
    74 install: $(EXEC)
    75     $(INSTALL) -d ../../../bin/$(GSDLOS)
    76     $(INSTALL) -m 755 -s $(EXEC) ../../../bin/$(GSDLOS)
     61EXECUTABLE_OBJECTS = \
     62    $(OBJECTS) \
     63    $(GSDL_LIBS)
     64
     65EXECUTABLE = txt2db
     66
     67
     68# Default target: make the txt2db executable
     69all: $(EXECUTABLE)
     70
     71txt2db: $(EXECUTABLE_OBJECTS)
     72    $(CXXLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
     73
     74install: $(EXECUTABLE)
     75    $(INSTALL) -d $(GSDL_DIR)/bin/$(GSDLOS)
     76    $(INSTALL) -m 755 -s $(EXECUTABLE) $(GSDL_DIR)/bin/$(GSDLOS)
     77
     78clean:
     79    rm -f $(OBJECTS) $(EXECUTABLE)
    7780
    7881distclean:
    79     rm -f $(OBJECTS) $(EXEC) Makefile
    80 
    81 clean:
    82     rm -f $(OBJECTS) $(EXEC)
     82    rm -f $(OBJECTS) $(EXECUTABLE) Makefile
    8383
    8484depend:
    85     makedepend -Y -- $(DEFS) $(INCLUDES) $(CFLAGS) -- $(SOURCES)
    86 
    87 
    88 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
    89 
    90 TXT2DB_OBJS = txt2db.o
    91 
    92 txt2db: $(TXT2DB_OBJS) $(DPLIBS)
    93     $(CXXLINK) $(TXT2DB_OBJS) $(LIBS)
    94 
    95 
    96 
    97 
    98 
    99 
     85    makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracChangeset for help on using the changeset viewer.