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

Last change on this file since 26822 was 26822, checked in by davidb, 9 years ago

Strip added as separate stage to help when cross-compiling

  • 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
35STRIP = @STRIP@
36INSTALL = @INSTALL@
37LDFLAGS = @LDFLAGS@ @ARCH_DEP_FLAGS@
38LIBS = @LIBS@
39
40
41CCOMPILE = $(CC) -c $(CFLAGS) $(DEFS) $(INCLUDES)
42CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
43CXXLINK = $(CXX) $(LDFLAGS) -o $@
44
45
46#.SUFFIXES:
47#.SUFFIXES: .cpp .o
48#.cpp.o:
49# $(CXXCOMPILE) $<
50
51%.o: %.cpp
52 $(CXXCOMPILE) $<
53
54%.o: %.c
55 $(CCOMPILE) $<
56
57
58SOURCES = \
59 getpw.cpp
60
61ifeq ($(GSDLOS),windows)
62 # e.g. we are cross-compiling with mingw under Linux
63 SOURCES += crypt.c crypt_util.c getpass.c
64endif
65
66ifeq ($(GSDLOS),android)
67 SOURCES += crypt.c crypt_util.c
68endif
69
70OBJECTS = \
71 getpw.o
72
73ifeq ($(GSDLOS),windows)
74 # e.g. we are cross-compiling with mingw under Linux
75 OBJECTS += crypt.o crypt_util.o getpass.o
76endif
77
78ifeq ($(GSDLOS),android)
79 OBJECTS += crypt.o crypt_util.o
80endif
81
82EXECUTABLE_OBJECTS = \
83 $(OBJECTS)
84
85EXECUTABLE = getpw
86
87
88# Default target: make the getpw executable
89all: $(EXECUTABLE)
90
91getpw: $(EXECUTABLE_OBJECTS)
92 $(CXXLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
93
94install: $(EXECUTABLE)
95 $(INSTALL) -d $(GSDL_DIR)/bin/$(GSDLOS)
96 $(STRIP) $(EXECUTABLE)
97 $(INSTALL) -m 755 $(EXECUTABLE) $(GSDL_DIR)/bin/$(GSDLOS)
98
99clean:
100 rm -f $(OBJECTS) $(EXECUTABLE)
101
102distclean:
103 rm -f $(OBJECTS) $(EXECUTABLE) Makefile
104
105depend:
106 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the repository browser.