[eglib] Don't define _FORTIFY_SOURCE on Cygwin builds (#18311)
[mono-project.git] / mono / eglib / Makefile.am
blob13b152eee39ba2a9211da6aaabe92615c72dc77e
1 include $(top_srcdir)/mk/common.mk
3 if !ENABLE_MSVC_ONLY
5 SUBDIRS = . test
7 noinst_LTLIBRARIES = libeglib.la
9 AM_CFLAGS = $(WERROR_CFLAGS)
11 win_files  = \
12         eglib-config.hw \
13         gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c \
14         gmodule-win32.c gmodule-win32-internals.h gtimer-win32.c gunicode-win32.c
16 unix_files = \
17         gdate-unix.c  gdir-unix.c  gfile-unix.c  gmisc-unix.c   \
18         gmodule-unix.c gtimer-unix.c gmodule-aix.c
20 if HOST_WIN32
21 os_files = $(win_files)
22 else
23 os_files = $(unix_files)
24 endif
26 libeglib_la_SOURCES = \
27         eglib-remap.h   \
28         sort.frag.h     \
29         glib.h          \
30         garray.c        \
31         gbytearray.c    \
32         gerror.c        \
33         ghashtable.c    \
34         giconv.c        \
35         gmem.c          \
36         gmodule.h       \
37         goutput.c       \
38         gqsort.c        \
39         gstr.c          \
40         gslist.c        \
41         gstring.c       \
42         gptrarray.c     \
43         glist.c         \
44         gqueue.c        \
45         gpath.c         \
46         gshell.c        \
47         gspawn.c        \
48         gfile.c         \
49         gfile-posix.c   \
50         gpattern.c      \
51         gmarkup.c       \
52         gutf8.c         \
53         gunicode.c      \
54         unicode-data.h  \
55         $(os_files)
57 endif # !ENABLE_MSVC_ONLY
59 CFLAGS := $(filter-out @CXX_REMOVE_CFLAGS@, @CFLAGS@) @CXX_ADD_CFLAGS@
61 if !ENABLE_MSVC_ONLY
63 eglibdir=$(datadir)/mono-$(API_VER)/mono/eglib
64 eglib_DATA = eglib-config.h
66 libeglib_la_CFLAGS = -g -Wall -D_GNU_SOURCE
68 if !HOST_WIN32
69 libeglib_la_CFLAGS += -D_FORTIFY_SOURCE=2
70 endif
72 AM_CPPFLAGS = -I$(srcdir)
74 if HOST_ANDROID
75 libeglib_la_LIBADD = -lm -llog
76 else
77 if HOST_WIN32
78 libeglib_la_LIBADD = -lm -lpsapi $(LTLIBICONV)
79 else
80 libeglib_la_LIBADD = -lm $(LTLIBICONV)
81 endif
82 endif
84 MAINTAINERCLEANFILES = Makefile.in
86 EXTRA_DIST = eglib-config.h.in $(win_files) $(unix_files)
88 endif # !ENABLE_MSVC_ONLY
90 if ENABLE_MSVC_ONLY
92 all-local:
94         make -C $(top_srcdir)/msvc eglib
96 clean-local:
98         make -C $(top_srcdir)/msvc clean-eglib
101 endif # ENABLE_MSVC_ONLY