source: main/trunk/greenstone2/common-src/src/getpw/Makefile.in@ 26679

Last change on this file since 26679 was 26679, checked in by davidb, 11 years ago

When testing the mingw cross-compiler changes, compiling 'getpw' ran in to some difficulties. While it would be nice to have both the host unix and cross-compile hosted by unix using the exact same code to implement crypt()/getpass() for now the decision has been made to allow the Unix compile to work as before (getting these functions from standard libraries) and for the mingw one to use the extra files supplied in this folder

  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
RevLine 
[1493]1###########################################################################
2#
[15917]3# Makefile -- src/getpw
[1493]4# A component of the Greenstone digital library software
5# from the New Zealand Digital Library Project at the
6# University of Waikato, New Zealand.
7#
[15917]8# Copyright (C) 2000-2008 The New Zealand Digital Library Project
[1493]9#
10# This program is free software; you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation; either version 2 of the License, or
13# (at your option) any later version.
14#
15# This program is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License
21# along with this program; if not, write to the Free Software
22# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23#
24###########################################################################
25
[16615]26GSDL_DIR = ../../..
27COMMON_DIR = $(GSDL_DIR)/common-src
[15917]28
[26648]29CC = @CC@
[2276]30CXX = @CXX@
[25149]31CXXFLAGS = @CXXFLAGS@ @ARCH_DEP_FLAGS@
[1493]32DEFS = @DEFS@
33GSDLOS = @gsdlos@
[26648]34INCLUDES = -I. -I$(COMMON_DIR) -I$(COMMON_DIR)/src/lib
[2900]35INSTALL = @INSTALL@
[25149]36LDFLAGS = @LDFLAGS@ @ARCH_DEP_FLAGS@
[15917]37LIBS = @LIBS@
38
39
[26648]40CCOMPILE = $(CC) -c $(CFLAGS) $(DEFS) $(INCLUDES)
[15917]41CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
42CXXLINK = $(CXX) $(LDFLAGS) -o $@
43
44
[26648]45#.SUFFIXES:
46#.SUFFIXES: .cpp .o
47#.cpp.o:
48# $(CXXCOMPILE) $<
49
50%.o: %.cpp
[15917]51 $(CXXCOMPILE) $<
[1493]52
[26648]53%.o: %.c
54 $(CCOMPILE) $<
[1493]55
[26648]56
[15917]57SOURCES = \
[26679]58 getpw.cpp
[1493]59
[26679]60ifeq ($(GSDLOS),windows)
61 # e.g. we are cross-compiling with mingw under Linux
62 SOURCES += crypt.c crypt_util.c getpass.c
63endif
64
[15917]65OBJECTS = \
[26679]66 getpw.o
[1493]67
[26679]68ifeq ($(GSDLOS),windows)
69 # e.g. we are cross-compiling with mingw under Linux
70 OBJECTS += crypt.o crypt_util.o getpass.o
71endif
72
[15917]73EXECUTABLE_OBJECTS = \
74 $(OBJECTS)
[1493]75
[15917]76EXECUTABLE = getpw
[1493]77
78
[15917]79# Default target: make the getpw executable
80all: $(EXECUTABLE)
[1493]81
[15920]82getpw: $(EXECUTABLE_OBJECTS)
[15917]83 $(CXXLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
[1493]84
[15917]85install: $(EXECUTABLE)
86 $(INSTALL) -d $(GSDL_DIR)/bin/$(GSDLOS)
[15921]87 $(INSTALL) -m 755 -s $(EXECUTABLE) $(GSDL_DIR)/bin/$(GSDLOS)
[1493]88
[15917]89clean:
90 rm -f $(OBJECTS) $(EXECUTABLE)
[1493]91
[15917]92distclean:
93 rm -f $(OBJECTS) $(EXECUTABLE) Makefile
[1493]94
[15917]95depend:
96 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the repository browser.