Changeset 15917

Show
Ignore:
Timestamp:
09.06.2008 13:36:26 (12 years ago)
Author:
mdewsnip
Message:

Changed getpw Makefile to handle the "lib" to "src/lib", and also tidied up to match the main Makefiles.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/src/getpw/Makefile.in

    r2999 r15917  
    11########################################################################### 
    22# 
    3 # Makefile -- Makefile for getpw 
     3# Makefile -- src/getpw 
    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) 2000  The New Zealand Digital Library Project 
     8# Copyright (C) 2000-2008  The New Zealand Digital Library Project 
    99# 
    1010# This program is free software; you can redistribute it and/or modify 
     
    2424########################################################################### 
    2525 
    26   
    27 AR = ar 
    28 CC = @CC@ 
    29 CFLAGS = @CFLAGS@ 
     26GSDL_DIR = ../.. 
     27 
     28 
    3029CXX = @CXX@ 
    31 CXXFLAGS = @CXXFLAGS@  
     30CXXFLAGS = @CXXFLAGS@ @COMPAT32BITFLAGS@ 
    3231DEFS = @DEFS@ 
    33 RANLIB = @RANLIB@ 
    34 # need to include config.h 
    35 INCLUDES = -I../.. -I../../lib 
    36 LDFLAGS = @LDFLAGS@ 
    37 DPLIBS =  
     32GSDLOS = @gsdlos@ 
     33INCLUDES = @INCLUDES@ -I$(GSDL_DIR) -I$(GSDL_DIR)/src/lib 
     34INSTALL = @INSTALL@ 
     35LDFLAGS = @LDFLAGS@ @COMPAT32BITFLAGS@ 
    3836LIBS = @LIBS@ 
    39 GSDLOS = @gsdlos@ 
    40 INSTALL = @INSTALL@ 
    41   
    42 LINK = $(CXX) $(LDFLAGS) -o $@ 
    43   
     37 
     38 
     39CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES) 
     40CXXLINK = $(CXX) $(LDFLAGS) -o $@ 
     41 
     42 
    4443.SUFFIXES: 
    45 .SUFFIXES: .c .o 
    46 .c.o: 
    47     $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS) $< 
    48  
    4944.SUFFIXES: .cpp .o 
    5045.cpp.o: 
    51     $(CXX) -c $(DEFS) $(INCLUDES) $(CXXFLAGS) $<  
     46    $(CXXCOMPILE) $<  
    5247 
    53 HEADERS =  
    5448 
    55 SOURCES = getpw.cpp 
     49SOURCES = \ 
     50    getpw.cpp 
    5651 
    57 OBJECTS = getpw.o 
     52OBJECTS = \ 
     53    getpw.o \ 
    5854 
    59 EXEC    = getpw 
    60   
    61 all : $(EXEC) 
     55EXECUTABLE_OBJECTS = \ 
     56    $(OBJECTS) 
    6257 
    63 install: $(EXEC) 
    64     $(INSTALL) -d ../../bin/$(GSDLOS) 
    65     $(INSTALL) -m 755 -s $(EXEC) ../../bin/$(GSDLOS) 
     58EXECUTABLE = getpw 
     59 
     60 
     61# Default target: make the getpw executable 
     62all: $(EXECUTABLE) 
     63 
     64hashfile: $(EXECUTABLE_OBJECTS) 
     65    $(CXXLINK) $(EXECUTABLE_OBJECTS) $(LIBS) 
     66 
     67install: $(EXECUTABLE) 
     68    $(INSTALL) -d $(GSDL_DIR)/bin/$(GSDLOS) 
     69    $(INSTALL) -m 755 -s $(EXEC) $(GSDL_DIR)/bin/$(GSDLOS) 
     70 
     71clean: 
     72    rm -f $(OBJECTS) $(EXECUTABLE) 
    6673 
    6774distclean: 
    68     rm -f $(OBJECTS) $(EXEC) Makefile 
    69  
    70 clean: 
    71     rm -f $(OBJECTS) $(EXEC) 
     75    rm -f $(OBJECTS) $(EXECUTABLE) Makefile 
    7276 
    7377depend: 
    74     makedepend -Y -- $(DEFS) $(INCLUDES) $(CCFLAGS) -- $(SOURCES) 
    75  
    76  
    77 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 
    78  
    79 GETPW_OBJS = getpw.o 
    80  
    81 getpw: $(GETPW_OBJS) $(DPLIBS) 
    82     $(LINK) $(GETPW_OBJS) $(LIBS)  
    83  
     78    makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)