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

Last change on this file since 26822 was 26822, checked in by davidb, 11 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
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
[26822]35STRIP = @STRIP@
[2900]36INSTALL = @INSTALL@
[25149]37LDFLAGS = @LDFLAGS@ @ARCH_DEP_FLAGS@
[15917]38LIBS = @LIBS@
39
40
[26648]41CCOMPILE = $(CC) -c $(CFLAGS) $(DEFS) $(INCLUDES)
[15917]42CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
43CXXLINK = $(CXX) $(LDFLAGS) -o $@
44
45
[26648]46#.SUFFIXES:
47#.SUFFIXES: .cpp .o
48#.cpp.o:
49# $(CXXCOMPILE) $<
50
51%.o: %.cpp
[15917]52 $(CXXCOMPILE) $<
[1493]53
[26648]54%.o: %.c
55 $(CCOMPILE) $<
[1493]56
[26648]57
[15917]58SOURCES = \
[26679]59 getpw.cpp
[1493]60
[26679]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
[26798]66ifeq ($(GSDLOS),android)
67 SOURCES += crypt.c crypt_util.c
68endif
69
[15917]70OBJECTS = \
[26679]71 getpw.o
[1493]72
[26679]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
[26798]78ifeq ($(GSDLOS),android)
79 OBJECTS += crypt.o crypt_util.o
80endif
81
[15917]82EXECUTABLE_OBJECTS = \
83 $(OBJECTS)
[1493]84
[15917]85EXECUTABLE = getpw
[1493]86
87
[15917]88# Default target: make the getpw executable
89all: $(EXECUTABLE)
[1493]90
[15920]91getpw: $(EXECUTABLE_OBJECTS)
[15917]92 $(CXXLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
[1493]93
[15917]94install: $(EXECUTABLE)
95 $(INSTALL) -d $(GSDL_DIR)/bin/$(GSDLOS)
[26822]96 $(STRIP) $(EXECUTABLE)
97 $(INSTALL) -m 755 $(EXECUTABLE) $(GSDL_DIR)/bin/$(GSDLOS)
[1493]98
[15917]99clean:
100 rm -f $(OBJECTS) $(EXECUTABLE)
[1493]101
[15917]102distclean:
103 rm -f $(OBJECTS) $(EXECUTABLE) Makefile
[1493]104
[15917]105depend:
106 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the repository browser.