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

Last change on this file since 26679 was 26679, checked in by davidb, 8 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
Line 
1###########################################################################
2#
3# Makefile -- src/getpw
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#
8# Copyright (C) 2000-2008 The New Zealand Digital Library Project
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
26GSDL_DIR = ../../..
27COMMON_DIR = $(GSDL_DIR)/common-src
28
29CC = @CC@
30CXX = @CXX@
31CXXFLAGS = @CXXFLAGS@ @ARCH_DEP_FLAGS@
32DEFS = @DEFS@
33GSDLOS = @gsdlos@
34INCLUDES = -I. -I$(COMMON_DIR) -I$(COMMON_DIR)/src/lib
35INSTALL = @INSTALL@
36LDFLAGS = @LDFLAGS@ @ARCH_DEP_FLAGS@
37LIBS = @LIBS@
38
39
40CCOMPILE = $(CC) -c $(CFLAGS) $(DEFS) $(INCLUDES)
41CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
42CXXLINK = $(CXX) $(LDFLAGS) -o $@
43
44
45#.SUFFIXES:
46#.SUFFIXES: .cpp .o
47#.cpp.o:
48# $(CXXCOMPILE) $<
49
50%.o: %.cpp
51 $(CXXCOMPILE) $<
52
53%.o: %.c
54 $(CCOMPILE) $<
55
56
57SOURCES = \
58 getpw.cpp
59
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
65OBJECTS = \
66 getpw.o
67
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
73EXECUTABLE_OBJECTS = \
74 $(OBJECTS)
75
76EXECUTABLE = getpw
77
78
79# Default target: make the getpw executable
80all: $(EXECUTABLE)
81
82getpw: $(EXECUTABLE_OBJECTS)
83 $(CXXLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
84
85install: $(EXECUTABLE)
86 $(INSTALL) -d $(GSDL_DIR)/bin/$(GSDLOS)
87 $(INSTALL) -m 755 -s $(EXECUTABLE) $(GSDL_DIR)/bin/$(GSDLOS)
88
89clean:
90 rm -f $(OBJECTS) $(EXECUTABLE)
91
92distclean:
93 rm -f $(OBJECTS) $(EXECUTABLE) Makefile
94
95depend:
96 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the repository browser.