aboutsummaryrefslogtreecommitdiff
path: root/generate/unix/Makefile.config
blob: 160fa38afdbb46fdd6e9fe77830005800a30cefd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#
# Makefile.config
#
# Common configuration and setup file to generate the ACPICA tools and
# utilities: acpiexec, acpisrc, acpixtract, and the iASL compiler.
#
# This file is included by the individual makefiles for each tool.
#

#
# Configuration
#
HOST =          _CYGWIN
CC =            gcc-4
ACPICA_SRC =    ../../../source
DIRS =          acpiexec acpinames acpisrc acpixtract iasl
INSTALLDIR =    /usr/bin

#
# Common defines
#
ASL_COMPILER =  $(ACPICA_SRC)/compiler
ACPICA_COMMON = $(ACPICA_SRC)/common
ACPICA_CORE =   $(ACPICA_SRC)/components
ACPICA_TOOLS =  $(ACPICA_SRC)/tools
ACPICA_OSL =    $(ACPICA_SRC)/os_specific/service_layers
COMPILE =       $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $?
COPYPROG =      @mkdir -p ../bin; rm -f ../bin/$(PROG); cp --remove-destination $(PROG) ../bin
INSTALLPROG =   cp --remove-destination $(PROG) $(INSTALLDIR)

#
# Common compiler flags. The warning flags in addition to -Wall are not
# automatically included in -Wall.
#
CFLAGS+= -Os -D$(HOST) -I$(ACPICA_SRC)/include -D_GNU_SOURCE
CWARNINGFLAGS = \
	-ansi \
	-Wall \
	-Wbad-function-cast \
	-Wdeclaration-after-statement \
	-Werror \
	-Wformat=2 \
	-Wmissing-declarations \
	-Wmissing-prototypes \
	-Wstrict-aliasing=2 \
	-Wstrict-prototypes \
	-Wswitch-default \
	-Wpointer-arith \
	-Wundef

#
# gcc 4+ flags
#
CWARNINGFLAGS+= \
	-Waddress \
	-Waggregate-return \
	-Wchar-subscripts \
	-Wempty-body \
	-Wlogical-op \
	-Wmissing-declarations \
	-Wmissing-field-initializers \
	-Wmissing-parameter-type \
	-Wnested-externs \
	-Wold-style-declaration \
	-Wold-style-definition \
	-Wredundant-decls \
	-Wtype-limits

#
# Extra warning flags (possible future use)
#
#CWARNINGFLAGS+= \
#	-Wredundant-decls \
#	-Wunreachable-code \
#	-Wcast-qual \
#	-Wconversion
#	-Wshadow \

#
# Bison/Flex configuration
#
YACC=    bison
YFLAGS+= -v -d -y -pAslCompiler

LEX=     flex
LFLAGS+= -i -s -PAslCompiler