Cygwin: add newgrp release notes
[newlib-cygwin.git] / winsup / cygwin / Makefile.am
blob376c79fc3c76464a508d27ad62190f129e41ab98
1 # Makefile.am for Cygwin.
3 # This file is part of Cygwin.
5 # This software is a copyrighted work licensed under the terms of the
6 # Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
7 # details.
9 # This makefile requires GNU make.
11 AUTOMAKE_OPTIONS=-Wno-override
13 include $(top_srcdir)/Makefile.am.common
15 COMMON_CFLAGS=-Wimplicit-fallthrough=5 -Werror -fmerge-constants -ftracer
16 if TARGET_X86_64
17 COMMON_CFLAGS+=-mcmodel=small
18 endif
20 AM_CFLAGS=$(cflags_common) $(COMMON_CFLAGS)
21 AM_CXXFLAGS=$(cxxflags_common) $(COMMON_CFLAGS) -fno-threadsafe-statics
23 if TARGET_X86_64
24 # Needed by mcountFunc.S to choose the right code path and symbol names
25 AM_CCASFLAGS=-D_WIN64
26 endif
28 target_builddir=@target_builddir@
29 newlib_build=$(target_builddir)/newlib
32 # Specialize libdir and includedir to use tooldir prefixed paths (containing
33 # target_alias) as used by newlib, because we overwrite library and header files
34 # installed there by newlib.
37 toollibdir=$(tooldir)/lib
38 toolincludedir=$(tooldir)/include
40 # Parameters used in building the cygwin.dll.
42 DLL_NAME=cygwin1.dll
43 NEW_DLL_NAME=new-cygwin1.dll
44 DEF_FILE=cygwin.def
45 LIB_NAME=libcygwin.a
48 # sources
51 # These objects are included directly into the import library
52 if TARGET_X86_64
53 TARGET_FILES= \
54         x86_64/bcopy.S \
55         x86_64/memchr.S \
56         x86_64/memcpy.S \
57         x86_64/memmove.S \
58         x86_64/mempcpy.S \
59         x86_64/memset.S \
60         x86_64/swab.S \
61         x86_64/wmemcpy.S \
62         x86_64/wmemmove.S \
63         x86_64/wmempcpy.S
64 endif
66 LIB_FILES= \
67         lib/_cygwin_crt0_common.cc \
68         lib/atexit.c \
69         lib/cygwin_attach_dll.c \
70         lib/cygwin_crt0.c \
71         lib/dll_entry.c \
72         lib/dll_main.cc \
73         lib/dso_handle.c \
74         lib/libcmain.c \
75         lib/premain0.c \
76         lib/premain1.c \
77         lib/premain2.c \
78         lib/premain3.c \
79         lib/pseudo-reloc-dummy.c
81 FHANDLER_FILES= \
82         fhandler/base.cc \
83         fhandler/clipboard.cc \
84         fhandler/console.cc \
85         fhandler/cygdrive.cc \
86         fhandler/dev.cc \
87         fhandler/dev_disk.cc \
88         fhandler/dev_fd.cc \
89         fhandler/disk_file.cc \
90         fhandler/dsp.cc \
91         fhandler/fifo.cc \
92         fhandler/floppy.cc \
93         fhandler/mixer.cc \
94         fhandler/mqueue.cc \
95         fhandler/netdrive.cc \
96         fhandler/nodevice.cc \
97         fhandler/null.cc \
98         fhandler/pipe.cc \
99         fhandler/proc.cc \
100         fhandler/process.cc \
101         fhandler/process_fd.cc \
102         fhandler/procnet.cc \
103         fhandler/procsys.cc \
104         fhandler/procsysvipc.cc \
105         fhandler/random.cc \
106         fhandler/raw.cc \
107         fhandler/registry.cc \
108         fhandler/serial.cc \
109         fhandler/signalfd.cc \
110         fhandler/socket.cc \
111         fhandler/socket_inet.cc \
112         fhandler/socket_local.cc \
113         fhandler/socket_unix.cc \
114         fhandler/tape.cc \
115         fhandler/termios.cc \
116         fhandler/timerfd.cc \
117         fhandler/pty.cc \
118         fhandler/virtual.cc \
119         fhandler/windows.cc \
120         fhandler/zero.cc
122 LIBC_FILES= \
123         libc/arc4random_stir.c \
124         libc/base64.c \
125         libc/bsdlib.cc \
126         libc/call_once.c \
127         libc/cnd.c \
128         libc/fnmatch.c \
129         libc/fts.c \
130         libc/ftw.c \
131         libc/getentropy.cc \
132         libc/getopt.c \
133         libc/inet_addr.c \
134         libc/inet_network.c \
135         libc/minires-os-if.c \
136         libc/minires.c \
137         libc/msgcat.c \
138         libc/mtx.c \
139         libc/nftw.c \
140         libc/rcmd.cc \
141         libc/rexec.cc \
142         libc/strfmon.c \
143         libc/strptime.cc \
144         libc/thrd.c \
145         libc/tss.c \
146         libc/xsique.cc
148 MATH_FILES= \
149         math/acoshl.c \
150         math/acosl.c \
151         math/asinhl.c \
152         math/asinl.c \
153         math/atan2l.c \
154         math/atanhl.c \
155         math/atanl.c \
156         math/cabsl.c \
157         math/cacosl.c \
158         math/cargl.c \
159         math/casinl.c \
160         math/catanl.c \
161         math/cbrtl.c \
162         math/ccosl.c \
163         math/ceill.S \
164         math/cephes_emath.c \
165         math/cexpl.c \
166         math/cimagl.c \
167         math/clog10l.c \
168         math/clogl.c \
169         math/conjl.c \
170         math/copysignl.S \
171         math/coshl.c \
172         math/cosl.c \
173         math/cosl_internal.S \
174         math/cossin.c \
175         math/cpowl.c \
176         math/cprojl.c \
177         math/creall.c \
178         math/csinl.c \
179         math/csqrtl.c \
180         math/ctanl.c \
181         math/erfl.c \
182         math/exp10l.c \
183         math/exp2l.S \
184         math/expl.c \
185         math/expm1l.c \
186         math/fabsl.c \
187         math/fdiml.c \
188         math/finite.c \
189         math/floorl.S \
190         math/fmal.c \
191         math/fmaxl.c \
192         math/fminl.c \
193         math/fmodl.c \
194         math/frexpl.S \
195         math/hypotl.c \
196         math/ilogbl.S \
197         math/internal_logl.S \
198         math/isinf.c \
199         math/isnan.c \
200         math/ldexpl.c \
201         math/lgammal.c \
202         math/llrint.c \
203         math/llrintf.c \
204         math/llrintl.c \
205         math/llroundl.c \
206         math/log10l.S \
207         math/log1pl.S \
208         math/log2l.S \
209         math/logbl.c \
210         math/logl.c \
211         math/lrint.c \
212         math/lrintf.c \
213         math/lrintl.c \
214         math/lroundl.c \
215         math/modfl.c \
216         math/nearbyint.S \
217         math/nearbyintf.S \
218         math/nearbyintl.S \
219         math/nextafterl.c \
220         math/nexttoward.c \
221         math/nexttowardf.c \
222         math/pow10l.c \
223         math/powil.c \
224         math/powl.c \
225         math/remainder.S \
226         math/remainderf.S \
227         math/remainderl.S \
228         math/remquol.S \
229         math/rint.c \
230         math/rintf.c \
231         math/rintl.c \
232         math/roundl.c \
233         math/scalbl.S \
234         math/scalbnl.S \
235         math/sinhl.c \
236         math/sinl.c \
237         math/sinl_internal.S \
238         math/sqrtl.c \
239         math/tanhl.c \
240         math/tanl.S \
241         math/tgammal.c \
242         math/truncl.c
244 MM_FILES = \
245         mm/cygheap.cc \
246         mm/heap.cc \
247         mm/malloc.cc \
248         mm/malloc_wrapper.cc \
249         mm/mmap.cc \
250         mm/mmap_alloc.cc \
251         mm/shared.cc
253 REGEX_FILES = \
254         regex/regcomp.c \
255         regex/regerror.c \
256         regex/regexec.c \
257         regex/regfree.c
259 SEC_FILES= \
260         sec/acl.cc \
261         sec/auth.cc \
262         sec/base.cc \
263         sec/helper.cc \
264         sec/posixacl.cc
266 TZCODE_FILES= \
267         tzcode/localtime_wrapper.c
269 DLL_FILES= \
270         advapi32.cc \
271         aio.cc \
272         assert.cc \
273         autoload.cc \
274         clock.cc \
275         create_posix_thread.cc \
276         ctype.cc \
277         cxx.cc \
278         cygthread.cc \
279         cygtls.cc \
280         cygwait.cc \
281         cygxdr.cc \
282         dcrt0.cc \
283         debug.cc \
284         devices.cc \
285         dir.cc \
286         dlfcn.cc \
287         dll_init.cc \
288         dtable.cc \
289         environ.cc \
290         errno.cc \
291         exceptions.cc \
292         exec.cc \
293         external.cc \
294         fcntl.cc \
295         fenv.c \
296         flock.cc \
297         fork.cc \
298         forkable.cc \
299         glob.cc \
300         glob_pattern_p.cc \
301         globals.cc \
302         grp.cc \
303         hookapi.cc \
304         init.cc \
305         ioctl.cc \
306         ipc.cc \
307         kernel32.cc \
308         ldap.cc \
309         libstdcxx_wrapper.cc \
310         loadavg.cc \
311         lsearch.cc \
312         miscfuncs.cc \
313         mktemp.cc \
314         msg.cc \
315         mount.cc \
316         net.cc \
317         netdb.cc \
318         nfs.cc \
319         nlsfuncs.cc \
320         ntea.cc \
321         passwd.cc \
322         path.cc \
323         pinfo.cc \
324         poll.cc \
325         posix_ipc.cc \
326         posix_timer.cc \
327         pseudo-reloc.cc \
328         thread.cc \
329         quotactl.cc \
330         random.cc \
331         registry.cc \
332         resource.cc \
333         scandir.cc \
334         sched.cc \
335         select.cc \
336         sem.cc \
337         setlsapwd.cc \
338         shm.cc \
339         signal.cc \
340         sigproc.cc \
341         smallprint.cc \
342         spawn.cc \
343         strace.cc \
344         strfuncs.cc \
345         strsep.cc \
346         strsig.cc \
347         sync.cc \
348         syscalls.cc \
349         sysconf.cc \
350         syslog.cc \
351         termios.cc \
352         timerfd.cc \
353         times.cc \
354         tls_pbuf.cc \
355         tty.cc \
356         uinfo.cc \
357         uname.cc \
358         wait.cc \
359         wincap.cc \
360         window.cc \
361         winf.cc
363 if TARGET_X86_64
364 GMON_TARGET_FILES = \
365         x86_64/mcountFunc.S
366 endif
368 GMON_FILES= \
369         $(GMON_TARGET_FILES) \
370         gmon.c \
371         mcount.c \
372         profil.c
374 GENERATED_FILES= \
375         sigfe.s \
376         uname_version.c
378 liblib_a_SOURCES= \
379         $(LIB_FILES)
381 libdll_a_SOURCES= \
382         $(TARGET_FILES) \
383         $(DLL_FILES) \
384         $(REGEX_FILES) \
385         $(FHANDLER_FILES) \
386         $(LIBC_FILES) \
387         $(MATH_FILES) \
388         $(MM_FILES) \
389         $(SEC_FILES) \
390         $(TZCODE_FILES) \
391         $(GENERATED_FILES)
394 # generated sources
397 shared_info_magic.h: scripts/cygmagic local_includes/shared_info.h
398         $(AM_V_GEN)$(srcdir)/scripts/cygmagic $@ "$(CC) $(INCLUDES) $(CPPFLAGS) -E -x c++" $(word 2,$^) SHARED_MAGIC 'class shared_info' USER_MAGIC 'class user_info'
400 child_info_magic.h: scripts/cygmagic local_includes/child_info.h
401         $(AM_V_GEN)$(srcdir)/scripts/cygmagic $@ "$(CC) $(INCLUDES) $(CPPFLAGS) -E -x c++" $(word 2,$^) CHILD_INFO_MAGIC 'class child_info'
403 globals.h: scripts/mkglobals_h globals.cc
404         $(AM_V_GEN)$^ > $@
406 localtime.patched.c: tzcode/localtime.c tzcode/localtime.c.patch
407         $(AM_V_GEN)patch -u -o localtime.patched.c \
408                     $(srcdir)/tzcode/localtime.c \
409                     $(srcdir)/tzcode/localtime.c.patch
411 $(srcdir)/devices.cc: scripts/gendevices devices.in local_includes/devices.h
412         $(wordlist 1,2,$^) $@
414 tlsoffsets: scripts/gentls_offsets local_includes/cygtls.h
415         $(AM_V_GEN)CXXCOMPILE="$(CXXCOMPILE)" $^ $@
417 BUILT_SOURCES = \
418         child_info_magic.h \
419         shared_info_magic.h \
420         globals.h \
421         localtime.patched.c
423 # Every time we touch a source file, the version info has to be rebuilt
424 # to maintain a correct build date, especially in uname release output
425 dirs = $(srcdir) $(srcdir)/fhandler $(srcdir)/lib $(srcdir)/libc $(srcdir)/math $(srcdir)/mm $(srcdir)/regex $(srcdir)/sec $(srcdir)/tzcode
426 find_src_files = $(wildcard $(dir)/*.[chS]) $(wildcard $(dir)/*.cc)
427 src_files := $(foreach dir,$(dirs),$(find_src_files))
429 # Regenerate uname_version.c only if it doesn't exist or if it differs
430 # from the former uname_version.c
431 uname_version.c: .FORCE
432         $(AM_V_GEN)cd $(srcdir) && \
433         echo "const char *uname_dev_version = \
434         \"$$(git rev-parse --git-dir >/dev/null 2>&1 && \
435              git describe --abbrev=12 --long --match 'cygwin*' --dirty | \
436              sed -e 's/cygwin-//')\";" \
437              > $(abs_builddir)/uname_version-pre.c && \
438         if [ -f $(abs_builddir)/uname_version.c ] && \
439            cmp $(abs_builddir)/uname_version.c \
440                $(abs_builddir)/uname_version-pre.c >/dev/null 2>&1 ; \
441         then :; else \
442                mv $(abs_builddir)/uname_version-pre.c \
443                   $(abs_builddir)/uname_version.c; fi
444 .FORCE:
446 # mkvers.sh creates version.cc in the first place, winver.o always
447 # second, so version.cc is always older than winver.o
448 version.cc: scripts/mkvers.sh include/cygwin/version.h winver.rc $(src_files)
449         @echo "Making version.cc and winver.o";\
450         export CC="$(CC)";\
451         /bin/sh $(word 1,$^) $(word 2,$^) $(word 3,$^) $(WINDRES) $(CFLAGS)
453 winver.o: version.cc
455 VERSION_OFILES = version.o winver.o
458 # export renames for mkimport
461 NEW_FUNCTIONS=$(addprefix --replace=,\
462         atexit= \
463         timezone= \
464         uname=uname_x \
465         __xdrrec_getrec= \
466         __xdrrec_setnonblock= \
467         xdr_array= \
468         xdr_bool= \
469         xdr_bytes= \
470         xdr_char= \
471         xdr_double= \
472         xdr_enum= \
473         xdr_float= \
474         xdr_free= \
475         xdr_hyper= \
476         xdr_int= \
477         xdr_int16_t= \
478         xdr_int32_t= \
479         xdr_int64_t= \
480         xdr_int8_t= \
481         xdr_long= \
482         xdr_longlong_t= \
483         xdr_netobj= \
484         xdr_opaque= \
485         xdr_pointer= \
486         xdr_reference= \
487         xdr_short= \
488         xdr_sizeof= \
489         xdr_string= \
490         xdr_u_char= \
491         xdr_u_hyper= \
492         xdr_u_int= \
493         xdr_u_int16_t= \
494         xdr_u_int32_t= \
495         xdr_u_int64_t= \
496         xdr_u_int8_t= \
497         xdr_u_long= \
498         xdr_u_longlong_t= \
499         xdr_u_short= \
500         xdr_uint16_t= \
501         xdr_uint32_t= \
502         xdr_uint64_t= \
503         xdr_uint8_t= \
504         xdr_union= \
505         xdr_vector= \
506         xdr_void= \
507         xdr_wrapstring= \
508         xdrmem_create= \
509         xdrrec_create= \
510         xdrrec_endofrecord= \
511         xdrrec_eof= \
512         xdrrec_skiprecord= \
513         xdrstdio_create= \
517 # per-file compilation flags
519 # (these come after, and thus override, the user-supplied CXXFLAGS, as they need
520 # to be able to fiddle with the optimization level)
523 override CFLAGS += $($(*F)_CFLAGS)
524 override CXXFLAGS += $($(*F)_CFLAGS)
525 AM_CXXFLAGS += $(CFLAGS)
527 localtime_wrapper_CFLAGS=-I$(srcdir)/tzcode -fwrapv
529 # required since gcc 9.x
530 exec_CFLAGS=-fno-builtin-execve
532 proc_CFLAGS=-DUSERNAME="\"$(USER)\"" -DHOSTNAME="\"$(HOSTNAME)\"" \
533                      -DGCC_VERSION="\"`$(CC) -v 2>&1 | tail -n 1`\""
535 dtable_CFLAGS=-fcheck-new
538 # libraries and installed objects
540 # (Don't ever try to use automake's shared library support via libtool to build
541 # Cygwin. Instead we have explicit rules to build it.)
544 SUBLIBS = \
545         libpthread.a \
546         libutil.a \
547         libm.a \
548         libc.a \
549         libdl.a \
550         libresolv.a \
551         librt.a \
552         libacl.a \
553         libssp.a
555 noinst_LIBRARIES = \
556         libdll.a \
557         liblib.a
559 toollib_LIBRARIES = \
560         libgmon.a
562 CYGWIN_START=crt0.o
563 GMON_START=gcrt0.o
564 INSTOBJS=automode.o binmode.o textmode.o textreadmode.o
566 toollib_DATA = \
567         $(CYGWIN_START) \
568         $(GMON_START) \
569         $(INSTOBJS) \
570         $(LIB_NAME) \
571         $(SUBLIBS)
573 libgmon_a_SOURCES = $(GMON_FILES)
574 libgmon_a_LIBADD =
576 # Enable deterministic archives for reproducible builds.
577 ARFLAGS = cr$${SOURCE_DATE_EPOCH:+D}
578 override RANLIB := $(RANLIB)$${SOURCE_DATE_EPOCH:+ -D}
580 # cygserver library
581 cygserver_blddir = ${target_builddir}/winsup/cygserver
582 LIBSERVER = $(cygserver_blddir)/libcygserver.a
584 $(LIBSERVER):
585         $(MAKE) -C $(cygserver_blddir) libcygserver.a
587 # We build as new-cygwin1.dll and rename at install time to overcome native
588 # rebuilding issues (we don't want the build tools to see a partially built
589 # cygwin1.dll and attempt to use it instead of the old one).
591 # linker script
592 LDSCRIPT=cygwin.sc
593 $(LDSCRIPT): $(LDSCRIPT).in
594         $(AM_V_GEN)$(CC) -E - -P < $^ -o $@
596 # cygwin dll
597 # Set PE and export table header timestamps to zero for reproducible builds.
598 $(NEW_DLL_NAME): $(LDSCRIPT) libdll.a $(VERSION_OFILES) $(LIBSERVER)\
599                   $(newlib_build)/libm.a $(newlib_build)/libc.a
600         $(AM_V_CXXLD)$(CXX) $(CXXFLAGS) \
601         -mno-use-libstdc-wrappers \
602         -Wl,--gc-sections -nostdlib -Wl,-T$(LDSCRIPT) \
603         -Wl,--dynamicbase -static \
604         $${SOURCE_DATE_EPOCH:+-Wl,--no-insert-timestamp} \
605         -Wl,--heap=0 -Wl,--out-implib,cygdll.a -shared -o $@ \
606         -e @DLL_ENTRY@ $(DEF_FILE) \
607         -Wl,-whole-archive libdll.a -Wl,-no-whole-archive \
608         $(VERSION_OFILES) \
609         $(LIBSERVER) \
610         $(newlib_build)/libm.a \
611         $(newlib_build)/libc.a \
612         -lgcc -lkernel32 -lntdll -Wl,-Map,cygwin.map
613         @$(MKDIR_P) ${target_builddir}/winsup/testsuite/testinst/bin/
614         $(AM_V_at)$(INSTALL_PROGRAM) $(NEW_DLL_NAME) ${target_builddir}/winsup/testsuite/testinst/bin/$(DLL_NAME)
616 # cygwin import library
617 toolopts=--cpu=@target_cpu@ --ar=@AR@ --as=@AS@ --nm=@NM@ --objcopy=@OBJCOPY@
619 $(DEF_FILE): scripts/gendef cygwin.din
620         $(AM_V_GEN)$(srcdir)/scripts/gendef --cpu=@target_cpu@ --output-def=$(DEF_FILE) $(srcdir)/cygwin.din
622 sigfe.s: $(DEF_FILE) tlsoffsets
623         @[ -s $@ ] || \
624         { rm -f $(DEF_FILE); $(MAKE) -s -j1 $(DEF_FILE); }; \
625         [ -s $@ ] && touch $@
627 LIBCOS=$(addsuffix .o,$(basename $(LIB_FILES)))
628 $(LIB_NAME): $(DEF_FILE) $(LIBCOS) | $(NEW_DLL_NAME)
629         $(AM_V_GEN)$(srcdir)/scripts/mkimport $(toolopts) $(NEW_FUNCTIONS) $@ cygdll.a $(wordlist 2,99,$^)
631 # sublibs
632 # import libraries for some subset of symbols indicated by given objects
633 speclib=\
634         $(srcdir)/scripts/speclib $(toolopts) \
635         --exclude='cygwin' \
636         --exclude='(?i:dll)' \
637         --exclude='reloc' \
638         --exclude='^main$$' \
639         --exclude='^_main$$'
641 libc.a: $(LIB_NAME) libm.a libpthread.a libutil.a
642         $(AM_V_GEN)$(speclib) $^ -v $(@F)
644 libm.a: $(LIB_NAME) $(newlib_build)/libm.a $(addsuffix .o,$(basename $(MATH_FILES)))
645         $(AM_V_GEN)$(speclib) $^ $(@F)
647 libpthread.a: $(LIB_NAME) thread.o libc/call_once.o libc/cnd.o \
648               libc/mtx.o libc/thrd.o libc/tss.o
649         $(AM_V_GEN)$(speclib) $^ $(@F)
651 libutil.a: $(LIB_NAME) libc/bsdlib.o
652         $(AM_V_GEN)$(speclib) $^ $(@F)
654 libdl.a: $(LIB_NAME) dlfcn.o
655         $(AM_V_GEN)$(speclib) $^ $(@F)
657 libresolv.a: $(LIB_NAME) libc/minires.o
658         $(AM_V_GEN)$(speclib) $^ $(@F)
660 librt.a: $(LIB_NAME) posix_ipc.o
661         $(AM_V_GEN)$(speclib) $^ $(@F)
663 libacl.a: $(LIB_NAME) sec/posixacl.o
664         $(AM_V_GEN)$(speclib) $^ $(@F)
666 libssp.a: $(LIB_NAME) $(wildcard $(newlib_build)/libc/ssp/*.o)
667         $(AM_V_GEN)$(speclib) $^ $(@F)
670 # all
673 all-local: $(LIB_NAME) $(SUBLIBS)
676 # clean
679 clean-local:
680         -rm -f $(BUILT_SOURCES)
681         -rm -f $(DEF_FILE) sigfe.s
682         -rm -f cygwin.sc cygdll.a cygwin.map
683         -rm -f $(NEW_DLL_NAME)
684         -rm -f $(LIB_NAME) $(SUBLIBS)
685         -rm -f version.cc
686         -rm -f tlsoffsets
688 maintainer-clean-local:
689         -rm -f $(srcdir)/devices.cc
692 # install
695 man_MANS = regex/regex.3 regex/regex.7
697 install-exec-hook: install-libs
698 install-data-local: install-headers install-ldif
700 install-libs:
701         @$(MKDIR_P) $(DESTDIR)$(bindir)
702         $(INSTALL_PROGRAM) $(NEW_DLL_NAME) $(DESTDIR)$(bindir)/$(DLL_NAME)
703         @$(MKDIR_P) $(DESTDIR)$(toollibdir)
704         (cd $(DESTDIR)$(toollibdir) && ln -sf $(LIB_NAME) libg.a)
706 install-headers:
707         cd $(srcdir)/include; \
708         for sub in `find . -type d -print | sort`; do \
709             $(MKDIR_P) $(DESTDIR)$(toolincludedir)/$$sub; \
710             for i in $$sub/*.h ; do \
711               $(INSTALL_DATA) $$i $(DESTDIR)$(toolincludedir)/$$sub/`basename $$i` ; \
712             done ; \
713         done ;
715 install-ldif:
716         @$(MKDIR_P) $(DESTDIR)$(datarootdir)/cygwin
717         $(INSTALL_DATA) $(srcdir)/cygwin.ldif $(DESTDIR)$(datarootdir)/cygwin
720 # uninstall
723 uninstall-hook: uninstall-headers uninstall-ldif uninstall-libs
725 uninstall-libs:
726         rm -f $(DESTDIR)$(bindir)/$(DLL_NAME)
727         rm -f $(DESTDIR)$(toollibdir)/libg.a
729 uninstall-headers:
730         cd $(srcdir)/include; \
731         for sub in `find . -type d -print | sort`; do \
732             for i in $$sub/*.h ; do \
733               rm -f $(DESTDIR)$(toolincludedir)/$$sub/`basename $$i` ; \
734             done ; \
735         done ;
737 uninstall-ldif:
738         rm -f $(DESTDIR)$(datarootdir)/cygwin/cygwin.ldif
740 ctags: CTAGS
741 tags:  CTAGS
742 CTAGS:
743         -cd $(srcdir) && \
744         ctags -R --c++-kinds=+p --fields=+iaS --extras=+q \
745         --regex-C++='/EXPORT_ALIAS *\([a-zA-Z0-9_]*, *([a-zA-Z0-9_]*)\)/\1/' \
746         --regex-C++='/__ASMNAME *\("([a-zA-Z0-9_]+)"\)/\1/' \
747         .