]>
Commit | Line | Data |
---|---|---|
61522196 | 1 | # Copyright (c) 2006, 2008, 2009, 2011, 2012, 2013 Red Hat, Inc. |
8e4735df CV |
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 | ||
efa82614 YS |
32 | MINGW32_CC := @MINGW32_CC@ |
33 | MINGW64_CC := @MINGW64_CC@ | |
34 | ||
8e4735df CV |
35 | CFLAGS := @CFLAGS@ |
36 | ||
37 | include $(srcdir)/../Makefile.common | |
38 | ||
61522196 CV |
39 | target_cpu:=@target_cpu@ |
40 | ||
efa82614 YS |
41 | WIN32_INCLUDES := -I. -I$(srcdir) |
42 | WIN32_CFLAGS := $(CFLAGS) $(WIN32_INCLUDES) | |
43 | WIN32_LDFLAGS := $(CFLAGS) -nostdlib -Wl,-shared | |
4941ce49 | 44 | |
00ef94f3 CV |
45 | # Never again try to remove advapi32. It does not matter if the DLL calls |
46 | # advapi32 functions or the equivalent ntdll functions. | |
47 | # But if the LSA authentication DLL is not linked against advapi32, it's | |
48 | # not recognized by LSA. | |
49 | LIBS := -ladvapi32 -lkernel32 -lntdll | |
8e4735df | 50 | |
61522196 | 51 | ifneq ($(target_cpu),x86_64) |
efa82614 YS |
52 | DLL32 := cyglsa.dll |
53 | DEF32 := cyglsa.def | |
54 | OBJ32 := cyglsa.o | |
61522196 | 55 | endif |
8e4735df | 56 | |
efa82614 YS |
57 | DLL64 := cyglsa64.dll |
58 | DEF64 := cyglsa64.def | |
59 | OBJ64 := cyglsa64.o | |
8e4735df CV |
60 | |
61 | .SUFFIXES: | |
62 | .NOEXPORT: | |
63 | ||
efa82614 | 64 | all: Makefile $(DLL32) $(DLL64) |
8e4735df | 65 | |
efa82614 | 66 | $(DEF32): cyglsa.din config.status |
8e4735df CV |
67 | $(SHELL) config.status |
68 | ||
efa82614 YS |
69 | $(DLL32): $(OBJ32) $(DEF32) |
70 | $(MINGW32_CC) -s $(WIN32_LDFLAGS) -o $@ $^ $(LIBS) | |
71 | ||
72 | $(OBJ32): cyglsa.c | |
73 | $(MINGW32_CC) $(WIN32_CFLAGS) -c -o $@ $< | |
74 | ||
75 | $(DLL64): $(OBJ64) $(DEF64) | |
76 | $(MINGW64_CC) -s $(WIN32_LDFLAGS) -o $@ $^ $(LIBS) | |
77 | ||
78 | $(OBJ64): cyglsa.c | |
79 | $(MINGW64_CC) $(WIN32_CFLAGS) -c -o $@ $< | |
8e4735df CV |
80 | |
81 | .PHONY: all install clean realclean | |
82 | ||
83 | realclean: clean | |
84 | rm -f Makefile config.cache | |
85 | ||
86 | clean: | |
8263a803 | 87 | rm -f *.o *.dll cyglsa.def |
8e4735df CV |
88 | |
89 | install: all | |
2e488e95 | 90 | /bin/mkdir -p $(DESTDIR)$(bindir) |
61522196 | 91 | ifneq ($(target_cpu),x86_64) |
efa82614 | 92 | $(INSTALL_PROGRAM) $(DLL32) $(DESTDIR)$(bindir)/$(DLL32) |
61522196 | 93 | endif |
efa82614 | 94 | $(INSTALL_PROGRAM) $(DLL64) $(DESTDIR)$(bindir)/$(DLL64) |
99fe2b78 | 95 | $(INSTALL_PROGRAM) $(srcdir)/cyglsa-config $(DESTDIR)$(bindir)/cyglsa-config |