Home | History | Annotate | Line # | Download | only in unix
Makefile.config revision 1.1.1.2
      1      1.1  jruoho #
      2      1.1  jruoho # Makefile.config
      3      1.1  jruoho #
      4      1.1  jruoho # Common configuration and setup file to generate the ACPICA tools and
      5  1.1.1.2  jruoho # utilities: the iASL compiler, acpiexec, acpihelp, acpinames, acpisrc,
      6  1.1.1.2  jruoho # acpixtract, acpibin.
      7      1.1  jruoho #
      8      1.1  jruoho # This file is included by the individual makefiles for each tool.
      9      1.1  jruoho #
     10      1.1  jruoho 
     11      1.1  jruoho #
     12  1.1.1.2  jruoho # Note: This makefile is intended to be used from within the native
     13  1.1.1.2  jruoho # ACPICA directory structure, from under generate/unix. It specifically
     14  1.1.1.2  jruoho # places all object files in a generate/unix subdirectory, not within
     15  1.1.1.2  jruoho # the various ACPICA source directories. This prevents collisions
     16  1.1.1.2  jruoho # between different compilations of the same source file with different
     17  1.1.1.2  jruoho # compile options, and prevents pollution of the source code.
     18  1.1.1.2  jruoho #
     19  1.1.1.2  jruoho 
     20  1.1.1.2  jruoho #
     21      1.1  jruoho # Configuration
     22  1.1.1.2  jruoho # Notes:
     23  1.1.1.2  jruoho #   gcc should be version 4 or greater, otherwise some of the options
     24  1.1.1.2  jruoho #       used will not be recognized.
     25  1.1.1.2  jruoho #   Global optimization flags (such as -O2, -Os) are not used, since
     26  1.1.1.2  jruoho #       they cause issues on some compilers.
     27  1.1.1.2  jruoho #   The _GNU_SOURCE symbol is required for many hosts.
     28      1.1  jruoho #
     29  1.1.1.2  jruoho PROGS =         acpibin acpiexec acpihelp acpinames acpisrc acpixtract iasl
     30  1.1.1.2  jruoho 
     31      1.1  jruoho HOST =          _CYGWIN
     32  1.1.1.2  jruoho CC =            gcc
     33  1.1.1.2  jruoho COMPILE =       $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $?
     34      1.1  jruoho 
     35      1.1  jruoho #
     36      1.1  jruoho # Common defines
     37      1.1  jruoho #
     38  1.1.1.2  jruoho ACPICA_SRC =    ../../../source
     39      1.1  jruoho ACPICA_COMMON = $(ACPICA_SRC)/common
     40      1.1  jruoho ACPICA_CORE =   $(ACPICA_SRC)/components
     41      1.1  jruoho ACPICA_TOOLS =  $(ACPICA_SRC)/tools
     42      1.1  jruoho ACPICA_OSL =    $(ACPICA_SRC)/os_specific/service_layers
     43  1.1.1.2  jruoho ASL_COMPILER =  $(ACPICA_SRC)/compiler
     44      1.1  jruoho COPYPROG =      @mkdir -p ../bin; rm -f ../bin/$(PROG); cp --remove-destination $(PROG) ../bin
     45  1.1.1.2  jruoho INSTALLDIR =    /usr/bin
     46      1.1  jruoho INSTALLPROG =   cp --remove-destination $(PROG) $(INSTALLDIR)
     47      1.1  jruoho #
     48      1.1  jruoho # Common compiler flags. The warning flags in addition to -Wall are not
     49      1.1  jruoho # automatically included in -Wall.
     50      1.1  jruoho #
     51  1.1.1.2  jruoho CFLAGS += \
     52  1.1.1.2  jruoho     -D$(HOST) \
     53  1.1.1.2  jruoho     -D_GNU_SOURCE \
     54  1.1.1.2  jruoho     -I$(ACPICA_SRC)/include
     55  1.1.1.2  jruoho 
     56      1.1  jruoho CWARNINGFLAGS = \
     57  1.1.1.2  jruoho     -ansi \
     58  1.1.1.2  jruoho     -Wall \
     59  1.1.1.2  jruoho     -Wbad-function-cast \
     60  1.1.1.2  jruoho     -Wdeclaration-after-statement \
     61  1.1.1.2  jruoho     -Werror \
     62  1.1.1.2  jruoho     -Wformat=2 \
     63  1.1.1.2  jruoho     -Wmissing-declarations \
     64  1.1.1.2  jruoho     -Wmissing-prototypes \
     65  1.1.1.2  jruoho     -Wstrict-aliasing=0 \
     66  1.1.1.2  jruoho     -Wstrict-prototypes \
     67  1.1.1.2  jruoho     -Wswitch-default \
     68  1.1.1.2  jruoho     -Wpointer-arith \
     69  1.1.1.2  jruoho     -Wundef
     70      1.1  jruoho 
     71      1.1  jruoho #
     72      1.1  jruoho # gcc 4+ flags
     73      1.1  jruoho #
     74  1.1.1.2  jruoho CWARNINGFLAGS += \
     75  1.1.1.2  jruoho     -Waddress \
     76  1.1.1.2  jruoho     -Waggregate-return \
     77  1.1.1.2  jruoho     -Wchar-subscripts \
     78  1.1.1.2  jruoho     -Wempty-body \
     79  1.1.1.2  jruoho     -Wlogical-op \
     80  1.1.1.2  jruoho     -Wmissing-declarations \
     81  1.1.1.2  jruoho     -Wmissing-field-initializers \
     82  1.1.1.2  jruoho     -Wmissing-parameter-type \
     83  1.1.1.2  jruoho     -Wnested-externs \
     84  1.1.1.2  jruoho     -Wold-style-declaration \
     85  1.1.1.2  jruoho     -Wold-style-definition \
     86  1.1.1.2  jruoho     -Wredundant-decls \
     87  1.1.1.2  jruoho     -Wtype-limits
     88      1.1  jruoho 
     89      1.1  jruoho #
     90      1.1  jruoho # Extra warning flags (possible future use)
     91      1.1  jruoho #
     92  1.1.1.2  jruoho #CWARNINGFLAGS += \
     93      1.1  jruoho #	-Wcast-qual \
     94      1.1  jruoho #	-Wconversion
     95      1.1  jruoho #	-Wshadow \
     96      1.1  jruoho 
     97      1.1  jruoho #
     98      1.1  jruoho # Bison/Flex configuration
     99      1.1  jruoho #
    100  1.1.1.2  jruoho # -v: verbose, produces a .output file
    101  1.1.1.2  jruoho # -d: produces the defines header file
    102  1.1.1.2  jruoho # -y: act like yacc
    103  1.1.1.2  jruoho #
    104  1.1.1.2  jruoho # -i: generate case insensitive scanner
    105  1.1.1.2  jruoho # -s: suppress default rule, abort on unknown input
    106  1.1.1.2  jruoho #
    107  1.1.1.2  jruoho # Berkeley yacc configuration
    108  1.1.1.2  jruoho #
    109  1.1.1.2  jruoho #YACC=      byacc
    110  1.1.1.2  jruoho #YFLAGS +=  -v -d
    111  1.1.1.2  jruoho #
    112  1.1.1.2  jruoho YACC=       bison
    113  1.1.1.2  jruoho YFLAGS +=   -v -d -y
    114      1.1  jruoho 
    115  1.1.1.2  jruoho LEX=        flex
    116  1.1.1.2  jruoho LFLAGS +=   -i -s
    117