2006-11-27 14:05:54 +01:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# A copy of the GNU General Public License can be found at
|
|
|
|
# http://www.gnu.org/
|
|
|
|
#
|
|
|
|
# Written by Corinna Vinschen <vinschen@redhat.de>
|
|
|
|
#
|
|
|
|
# Makefile for Cygwin subauthentication DLL.
|
|
|
|
|
|
|
|
SHELL := @SHELL@
|
|
|
|
|
|
|
|
srcdir := @srcdir@
|
|
|
|
VPATH := @srcdir@
|
|
|
|
prefix := @prefix@
|
|
|
|
exec_prefix := @exec_prefix@
|
|
|
|
|
|
|
|
bindir := @bindir@
|
|
|
|
etcdir := $(exec_prefix)/etc
|
|
|
|
|
|
|
|
INSTALL := @INSTALL@
|
|
|
|
INSTALL_PROGRAM := @INSTALL_PROGRAM@
|
|
|
|
INSTALL_DATA := @INSTALL_DATA@
|
|
|
|
|
|
|
|
CC := @CC@
|
|
|
|
CC_FOR_TARGET := $(CC)
|
|
|
|
|
2012-10-24 11:35:38 +02:00
|
|
|
MINGW32_CC := @MINGW32_CC@
|
|
|
|
MINGW64_CC := @MINGW64_CC@
|
|
|
|
|
2006-11-27 14:05:54 +01:00
|
|
|
CFLAGS := @CFLAGS@
|
|
|
|
|
|
|
|
include $(srcdir)/../Makefile.common
|
|
|
|
|
2013-04-23 11:44:36 +02:00
|
|
|
target_cpu:=@target_cpu@
|
|
|
|
|
2012-10-24 11:35:38 +02:00
|
|
|
WIN32_INCLUDES := -I. -I$(srcdir)
|
|
|
|
WIN32_CFLAGS := $(CFLAGS) $(WIN32_INCLUDES)
|
|
|
|
WIN32_LDFLAGS := $(CFLAGS) -nostdlib -Wl,-shared
|
2008-10-13 01:53:26 +02:00
|
|
|
|
2012-05-29 14:46:01 +02:00
|
|
|
# Never again try to remove advapi32. It does not matter if the DLL calls
|
|
|
|
# advapi32 functions or the equivalent ntdll functions.
|
|
|
|
# But if the LSA authentication DLL is not linked against advapi32, it's
|
|
|
|
# not recognized by LSA.
|
|
|
|
LIBS := -ladvapi32 -lkernel32 -lntdll
|
2006-11-27 14:05:54 +01:00
|
|
|
|
2013-04-23 11:44:36 +02:00
|
|
|
ifneq ($(target_cpu),x86_64)
|
2012-10-24 11:35:38 +02:00
|
|
|
DLL32 := cyglsa.dll
|
|
|
|
DEF32 := cyglsa.def
|
|
|
|
OBJ32 := cyglsa.o
|
2013-04-23 11:44:36 +02:00
|
|
|
endif
|
2006-11-27 14:05:54 +01:00
|
|
|
|
2012-10-24 11:35:38 +02:00
|
|
|
DLL64 := cyglsa64.dll
|
|
|
|
DEF64 := cyglsa64.def
|
|
|
|
OBJ64 := cyglsa64.o
|
2006-11-27 14:05:54 +01:00
|
|
|
|
|
|
|
.SUFFIXES:
|
|
|
|
.NOEXPORT:
|
|
|
|
|
2012-10-24 11:35:38 +02:00
|
|
|
all: Makefile $(DLL32) $(DLL64)
|
2006-11-27 14:05:54 +01:00
|
|
|
|
2012-10-24 11:35:38 +02:00
|
|
|
$(DEF32): cyglsa.din config.status
|
2006-11-27 14:05:54 +01:00
|
|
|
$(SHELL) config.status
|
|
|
|
|
2012-10-24 11:35:38 +02:00
|
|
|
$(DLL32): $(OBJ32) $(DEF32)
|
2013-07-29 20:57:16 +02:00
|
|
|
$(MINGW32_CC) -s $(WIN32_LDFLAGS) -e _DllMain@12 -o $@ $^ $(LIBS)
|
2012-10-24 11:35:38 +02:00
|
|
|
|
|
|
|
$(OBJ32): cyglsa.c
|
|
|
|
$(MINGW32_CC) $(WIN32_CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
$(DLL64): $(OBJ64) $(DEF64)
|
2013-07-29 20:57:16 +02:00
|
|
|
$(MINGW64_CC) -s $(WIN32_LDFLAGS) -e DllMain -o $@ $^ $(LIBS)
|
2012-10-24 11:35:38 +02:00
|
|
|
|
|
|
|
$(OBJ64): cyglsa.c
|
|
|
|
$(MINGW64_CC) $(WIN32_CFLAGS) -c -o $@ $<
|
2006-11-27 14:05:54 +01:00
|
|
|
|
|
|
|
.PHONY: all install clean realclean
|
|
|
|
|
|
|
|
realclean: clean
|
|
|
|
rm -f Makefile config.cache
|
|
|
|
|
|
|
|
clean:
|
2011-03-31 16:19:35 +02:00
|
|
|
rm -f *.o *.dll cyglsa.def
|
2006-11-27 14:05:54 +01:00
|
|
|
|
|
|
|
install: all
|
2012-11-23 15:52:07 +01:00
|
|
|
/bin/mkdir -p $(DESTDIR)$(bindir)
|
2013-04-23 11:44:36 +02:00
|
|
|
ifneq ($(target_cpu),x86_64)
|
2012-10-24 11:35:38 +02:00
|
|
|
$(INSTALL_PROGRAM) $(DLL32) $(DESTDIR)$(bindir)/$(DLL32)
|
2013-04-23 11:44:36 +02:00
|
|
|
endif
|
2012-10-24 11:35:38 +02:00
|
|
|
$(INSTALL_PROGRAM) $(DLL64) $(DESTDIR)$(bindir)/$(DLL64)
|
2009-02-24 03:11:14 +01:00
|
|
|
$(INSTALL_PROGRAM) $(srcdir)/cyglsa-config $(DESTDIR)$(bindir)/cyglsa-config
|