OSDN Git Service

Add DESTDIR functionality to Makefile.in's.
[pf3gnuchains/pf3gnuchains4x.git] / winsup / lsaauth / Makefile.in
1 # Copyright (c) 2006, Red Hat, Inc.
2 #
3 #     This program is free software; you can redistribute it and/or modify
4 #     it under the terms of the GNU General Public License as published by
5 #     the Free Software Foundation; either version 2 of the License, or
6 #     (at your option) any later version.
7 #
8 #     A copy of the GNU General Public License can be found at
9 #     http://www.gnu.org/
10 #
11 # Written by Corinna Vinschen <vinschen@redhat.de>
12 #
13 # Makefile for Cygwin subauthentication DLL.
14
15 SHELL := @SHELL@
16
17 srcdir          := @srcdir@
18 VPATH           := @srcdir@
19 prefix          := @prefix@
20 exec_prefix     := @exec_prefix@
21
22 bindir          := @bindir@
23 etcdir          := $(exec_prefix)/etc
24
25 INSTALL         := @INSTALL@
26 INSTALL_PROGRAM := @INSTALL_PROGRAM@
27 INSTALL_DATA    := @INSTALL_DATA@
28
29 CC              := @CC@
30 CC_FOR_TARGET   := $(CC)
31
32 override CC     := @NO_CYGWIN@ $(firstword ${CC})
33
34 CFLAGS          := @CFLAGS@
35
36 include $(srcdir)/../Makefile.common
37
38 WIN32_INCLUDES  := -I. -I$(srcdir) $(w32api_include) $(w32api_include)/ddk
39 WIN32_CFLAGS    := $(CFLAGS) $(WIN32_COMMON) $(WIN32_INCLUDES)
40 WIN32_LDFLAGS   := $(CFLAGS) $(WIN32_COMMON) -nostdlib -Wl,-shared
41
42 ifdef MINGW_CC
43 override CC:=${MINGW_CC}
44 endif
45
46 LIBS            := -ladvapi32 -lkernel32 -lntdll
47
48 DLL     :=      cyglsa.dll
49 DEF_FILE:=      cyglsa.def
50
51 OBJ     =       cyglsa.o
52
53 .SUFFIXES:
54 .NOEXPORT:
55
56 all: Makefile $(DLL)
57
58 $(DEF_FILE): cyglsa.din config.status
59         $(SHELL) config.status
60
61 $(DLL): $(OBJ) $(DEF_FILE)
62         $(CC) -s $(WIN32_LDFLAGS) -o $@ $^ $(LIBS)
63
64 .PHONY: all install clean realclean
65
66 realclean: clean
67         rm -f  Makefile config.cache
68
69 clean:
70         rm -f *.o *.dll
71
72 install: all
73         $(SHELL) $(updir1)/mkinstalldirs $(DESTDIR)$(bindir)
74         $(INSTALL_PROGRAM) $(DLL) $(DESTDIR)$(bindir)/$(DLL)
75         $(INSTALL_PROGRAM) $(srcdir)/cyglsa64.dll $(DESTDIR)$(bindir)/cyglsa64.dll
76         $(INSTALL_PROGRAM) $(srcdir)/cyglsa-config $(DESTDIR)$(bindir)/cyglsa-config
77
78 %.o: %.c
79         $(CC) $(WIN32_CFLAGS) -c -o $@ $<