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
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
65ifeq ($(GSDLOS),android)
66 SOURCES += crypt.c crypt_util.c
67endif
68
69OBJECTS = \
70 getpw.o
71
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
77ifeq ($(GSDLOS),android)
78 OBJECTS += crypt.o crypt_util.o
79endif
80
81EXECUTABLE_OBJECTS = \
82 $(OBJECTS)
83
84EXECUTABLE = getpw
85
86
87# Default target: make the getpw executable
88all: $(EXECUTABLE)
89
90getpw: $(EXECUTABLE_OBJECTS)
91 $(CXXLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
92
93install: $(EXECUTABLE)
94 $(INSTALL) -d $(GSDL_DIR)/bin/$(GSDLOS)
95 $(INSTALL) -m 755 -s $(EXECUTABLE) $(GSDL_DIR)/bin/$(GSDLOS)
96
97clean:
98 rm -f $(OBJECTS) $(EXECUTABLE)
99
100distclean:
101 rm -f $(OBJECTS) $(EXECUTABLE) Makefile
102
103depend:
104 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the repository browser.