source: grub-pc/trunk/fuentes/conf/Makefile.common @ 22

Last change on this file since 22 was 22, checked in by mabarracus, 5 years ago

updated version and apply net.ifnames=0 into debian/rules

File size: 4.9 KB
Line 
1# -*- makefile -*-
2
3CFLAGS_PLATFORM=
4
5export LC_COLLATE := C
6unexport LC_ALL
7
8# Platform specific options
9if COND_sparc64_ieee1275
10  CFLAGS_PLATFORM += -mno-app-regs
11  LDFLAGS_PLATFORM = -Wl,-melf64_sparc -Wl,--no-relax
12endif
13if COND_sparc64_emu
14  CFLAGS_PLATFORM += -mno-app-regs
15  LDFLAGS_PLATFORM = -Wl,--no-relax
16endif
17if COND_arm
18if !COND_emu
19  LDFLAGS_PLATFORM = -Wl,--wrap=__clear_cache
20endif
21endif
22if COND_arm64
23  CFLAGS_PLATFORM += -mcmodel=large
24endif
25
26if COND_powerpc_ieee1275
27  CFLAGS_PLATFORM += -mcpu=powerpc
28endif
29
30#FIXME: discover and check XEN headers
31CPPFLAGS_XEN = -I/usr/include
32
33# Other options
34
35CPPFLAGS_DEFAULT = -DGRUB_FILE=\"$(subst $(srcdir)/,,$<)\"
36CPPFLAGS_DEFAULT += -I$(builddir)
37CPPFLAGS_DEFAULT += -I$(srcdir)
38CPPFLAGS_DEFAULT += -I$(top_builddir)
39CPPFLAGS_DEFAULT += -I$(top_srcdir)
40CPPFLAGS_DEFAULT += -I$(top_srcdir)/include
41CPPFLAGS_DEFAULT += -I$(top_builddir)/include
42CPPFLAGS_DEFAULT += -I$(top_srcdir)/grub-core/lib/libgcrypt-grub/src/
43CCASFLAGS_DEFAULT = $(CPPFLAGS_DEFAULT) -DASM_FILE=1
44BUILD_CPPFLAGS += $(CPPFLAGS_DEFAULT)
45
46LDADD_KERNEL = $(TARGET_LIBGCC)
47
48CFLAGS_KERNEL = $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -ffreestanding
49LDFLAGS_KERNEL = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib $(TARGET_LDFLAGS_OLDMAGIC) $(TARGET_LDFLAGS_STATIC_LIBGCC)
50CPPFLAGS_KERNEL = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM) -DGRUB_KERNEL=1
51CCASFLAGS_KERNEL = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM)
52STRIPFLAGS_KERNEL = -R .rel.dyn -R .reginfo -R .note -R .comment -R .drectve -R .note.gnu.gold-version
53
54CFLAGS_MODULE = $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -ffreestanding
55LDFLAGS_MODULE = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib $(TARGET_LDFLAGS_OLDMAGIC) -Wl,-r,-d
56CPPFLAGS_MODULE = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM)
57CCASFLAGS_MODULE = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM)
58
59CFLAGS_IMAGE = $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -fno-builtin
60LDFLAGS_IMAGE = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib $(TARGET_LDFLAGS_OLDMAGIC) -Wl,-S
61CPPFLAGS_IMAGE = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM)
62CCASFLAGS_IMAGE = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM)
63
64CFLAGS_PROGRAM =
65LDFLAGS_PROGRAM =
66CPPFLAGS_PROGRAM =
67CCASFLAGS_PROGRAM =
68
69CFLAGS_LIBRARY =
70CPPFLAGS_LIBRARY =
71CCASFLAGS_LIBRARY =
72
73# Other variables
74
75grubconfdir = $(sysconfdir)/grub.d
76platformdir = $(pkglibdir)/$(target_cpu)-$(platform)
77starfielddir = $(pkgdatadir)/themes/starfield
78
79CFLAGS_GNULIB = -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code -Wno-conversion
80CPPFLAGS_GNULIB = -I$(top_builddir)/grub-core/gnulib -I$(top_srcdir)/grub-core/gnulib
81
82CFLAGS_POSIX = -fno-builtin
83CPPFLAGS_POSIX = -I$(top_srcdir)/grub-core/lib/posix_wrap
84
85CFLAGS_GCRY = -Wno-error -Wno-missing-field-initializers -Wno-redundant-decls -Wno-undef $(CFLAGS_POSIX)
86CPPFLAGS_GCRY = -I$(top_srcdir)/grub-core/lib/libgcrypt_wrap $(CPPFLAGS_POSIX) -D_GCRYPT_IN_LIBGCRYPT=1 -I$(top_srcdir)/include/grub/gcrypt
87
88CPPFLAGS_EFIEMU = -I$(top_srcdir)/grub-core/efiemu/runtime
89
90# List file macros for recognizing /interesting/ modules
91CPPFLAGS_FS_LIST = -Dgrub_fs_register=FS_LIST_MARKER
92CPPFLAGS_VIDEO_LIST= -Dgrub_video_register=VIDEO_LIST_MARKER
93CPPFLAGS_PARTMAP_LIST = -Dgrub_partition_map_register=PARTMAP_LIST_MARKER
94CPPFLAGS_PARTTOOL_LIST = -Dgrub_parttool_register=PARTTOOL_LIST_MARKER
95CPPFLAGS_TERMINAL_LIST = '-Dgrub_term_register_input(...)=INPUT_TERMINAL_LIST_MARKER(__VA_ARGS__)'
96CPPFLAGS_TERMINAL_LIST += '-Dgrub_term_register_output(...)=OUTPUT_TERMINAL_LIST_MARKER(__VA_ARGS__)'
97CPPFLAGS_COMMAND_LIST = '-Dgrub_register_command(...)=COMMAND_LIST_MARKER(__VA_ARGS__)'
98CPPFLAGS_COMMAND_LIST += '-Dgrub_register_extcmd(...)=EXTCOMMAND_LIST_MARKER(__VA_ARGS__)'
99CPPFLAGS_COMMAND_LIST += '-Dgrub_register_command_p1(...)=P1COMMAND_LIST_MARKER(__VA_ARGS__)'
100CPPFLAGS_MARKER = $(CPPFLAGS_FS_LIST) $(CPPFLAGS_VIDEO_LIST) \
101        $(CPPFLAGS_PARTTOOL_LIST) $(CPPFLAGS_PARTMAP_LIST) \
102        $(CPPFLAGS_TERMINAL_LIST) $(CPPFLAGS_COMMAND_LIST)
103
104# Define these variables to calm down automake
105
106IMG_FILES =
107MOD_FILES =
108MODULE_FILES =
109MARKER_FILES =
110KERNEL_HEADER_FILES =
111
112man_MANS =
113noinst_DATA =
114pkgdata_DATA =
115bin_SCRIPTS =
116sbin_SCRIPTS =
117bin_PROGRAMS =
118platform_DATA =
119sbin_PROGRAMS =
120check_SCRIPTS =
121dist_grubconf_DATA =
122check_PROGRAMS =
123noinst_SCRIPTS =
124noinst_PROGRAMS =
125grubconf_SCRIPTS =
126noinst_LIBRARIES =
127dist_noinst_DATA =
128platform_SCRIPTS =
129platform_PROGRAMS =
130
131TESTS =
132EXTRA_DIST =
133CLEANFILES =
134BUILT_SOURCES =
135
136# Rules for Automake input
137
138.PRECIOUS: $(top_srcdir)/Makefile.util.am
139$(top_srcdir)/Makefile.util.am: $(top_srcdir)/gentpl.py $(top_srcdir)/Makefile.util.def $(top_srcdir)/Makefile.utilgcry.def
140        python $^ > $@.new || (rm -f $@.new; exit 1)
141        mv $@.new $@
142
143.PRECIOUS: $(top_srcdir)/grub-core/Makefile.core.am
144$(top_srcdir)/grub-core/Makefile.core.am: $(top_srcdir)/gentpl.py $(top_srcdir)/grub-core/Makefile.core.def $(top_srcdir)/grub-core/Makefile.gcry.def
145        if [ "x$$GRUB_CONTRIB" != x ]; then echo "You need to run ./autogen.sh manually." >&2; exit 1; fi
146        python $^ > $@.new || (rm -f $@.new; exit 1)
147        mv $@.new $@
Note: See TracBrowser for help on using the repository browser.