1 # Copyright (c) 2006, Red Hat, Inc.
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.
8 # A copy of the GNU General Public License can be found at
11 # Written by Corinna Vinschen <vinschen@redhat.de>
13 # Makefile for Cygwin subauthentication DLL.
20 exec_prefix := @exec_prefix@
23 etcdir := $(exec_prefix)/etc
26 INSTALL_PROGRAM := @INSTALL_PROGRAM@
27 INSTALL_DATA := @INSTALL_DATA@
30 CC_FOR_TARGET := $(CC)
32 override CC := @NO_CYGWIN@ $(firstword ${CC})
36 include $(srcdir)/../Makefile.common
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
43 override CC:=${MINGW_CC}
46 LIBS := -ladvapi32 -lkernel32 -lntdll
58 $(DEF_FILE): cyglsa.din config.status
59 $(SHELL) config.status
61 $(DLL): $(OBJ) $(DEF_FILE)
62 $(CC) -s $(WIN32_LDFLAGS) -o $@ $^ $(LIBS)
64 .PHONY: all install clean realclean
67 rm -f Makefile config.cache
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
79 $(CC) $(WIN32_CFLAGS) -c -o $@ $<