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

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

Support for cross-compiling with Android-NDK added

  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 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
[26798]65ifeq ($(GSDLOS),android)
66 SOURCES += crypt.c crypt_util.c
67endif
68
[15917]69OBJECTS = \
[26679]70 getpw.o
[1493]71
[26679]72ifeq ($(GSDLOS),windows)
73 # e.g. we are cross-compiling with mingw under Linux
74 OBJECTS += crypt.o crypt_util.o getpass.o
75endif
76
[26798]77ifeq ($(GSDLOS),android)
78 OBJECTS += crypt.o crypt_util.o
79endif
80
[15917]81EXECUTABLE_OBJECTS = \
82 $(OBJECTS)
[1493]83
[15917]84EXECUTABLE = getpw
[1493]85
86
[15917]87# Default target: make the getpw executable
88all: $(EXECUTABLE)
[1493]89
[15920]90getpw: $(EXECUTABLE_OBJECTS)
[15917]91 $(CXXLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
[1493]92
[15917]93install: $(EXECUTABLE)
94 $(INSTALL) -d $(GSDL_DIR)/bin/$(GSDLOS)
[15921]95 $(INSTALL) -m 755 -s $(EXECUTABLE) $(GSDL_DIR)/bin/$(GSDLOS)
[1493]96
[15917]97clean:
98 rm -f $(OBJECTS) $(EXECUTABLE)
[1493]99
[15917]100distclean:
101 rm -f $(OBJECTS) $(EXECUTABLE) Makefile
[1493]102
[15917]103depend:
104 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the repository browser.