Rev 1498 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1498 | Rev 2216 | ||
---|---|---|---|
Line -... | Line 1... | ||
- | 1 | # |
|
- | 2 | # acpisrc - ACPICA source code conversion utility |
|
1 | PROG= acpisrc |
3 | # |
- | 4 | # NOTE: This makefile is intended to be used in the Linux environment, |
|
- | 5 | # with the Linux directory structure. It will not work directly |
|
- | 6 | # on the native ACPICA source tree. |
|
- | 7 | # |
|
2 | SRCS= ascase.c asconvrt.c asfile.c asmain.c asremove.c astable.c \ |
8 | |
- | 9 | # |
|
- | 10 | # Configuration |
|
- | 11 | # Notes: |
|
- | 12 | # gcc should be version 4 or greater, otherwise some of the options |
|
- | 13 | # used will not be recognized. |
|
- | 14 | # Global optimization flags (such as -O2, -Os) are not used, since |
|
- | 15 | # they cause issues on some compilers. |
|
- | 16 | # The _GNU_SOURCE symbol is required for many hosts. |
|
- | 17 | # |
|
3 | asutils.c osunixdir.c ../../common/getopt.c |
18 | PROG = acpisrc |
4 | - | ||
5 | CFLAGS+= -Wall -O2 -D_LINUX -DACPI_APPLICATION -Wstrict-prototypes -I../../include |
- | |
6 | - | ||
7 | - | ||
8 | aslmain : $(patsubst %.c,%.o, $(SRCS)) |
- | |
Line -... | Line 19... | ||
- | 19 | ||
- | 20 | HOST = _LINUX |
|
- | 21 | NOMAN = YES |
|
- | 22 | COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $? |
|
- | 23 | ||
- | 24 | ACPICA_COMPONENTS = |
|
- | 25 | ACPICA_SRC = ../.. |
|
- | 26 | ACPICA_COMMON = $(ACPICA_SRC)/common |
|
- | 27 | ACPICA_CORE = $(ACPICA_SRC)$(ACPICA_COMPONENTS) |
|
- | 28 | ACPICA_TOOLS = $(ACPICA_SRC)/tools |
|
- | 29 | ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers |
|
- | 30 | INSTALLDIR = /usr/bin |
|
- | 31 | INSTALLPROG = cp --remove-destination $(PROG) $(INSTALLDIR) |
|
- | 32 | ||
- | 33 | CFLAGS+= \ |
|
- | 34 | -D$(HOST) \ |
|
- | 35 | -D_GNU_SOURCE \ |
|
- | 36 | -DACPI_SRC_APP \ |
|
- | 37 | -I$(ACPICA_SRC)/include \ |
|
- | 38 | -I. |
|
- | 39 | ||
- | 40 | CWARNINGFLAGS = \ |
|
- | 41 | -ansi \ |
|
- | 42 | -Wall \ |
|
9 | $(CC) $(LDFLAGS) $(patsubst %.c,%.o, $(SRCS)) -o $(PROG) |
43 | -Wbad-function-cast \ |
- | 44 | -Wdeclaration-after-statement \ |
|
- | 45 | -Werror \ |
|
- | 46 | -Wformat=2 \ |
|
- | 47 | -Wmissing-declarations \ |
|
- | 48 | -Wmissing-prototypes \ |
|
- | 49 | -Wstrict-aliasing=0 \ |
|
- | 50 | -Wstrict-prototypes \ |
|
- | 51 | -Wswitch-default \ |
|
- | 52 | -Wpointer-arith \ |
|
- | 53 | -Wundef |
|
- | 54 | ||
- | 55 | OBJS = \ |
|
- | 56 | ascase.o \ |
|
- | 57 | asconvrt.o \ |
|
- | 58 | asfile.o \ |
|
- | 59 | asmain.o \ |
|
- | 60 | asremove.o \ |
|
- | 61 | astable.o \ |
|
- | 62 | asutils.o \ |
|
- | 63 | osunixdir.o \ |
|
- | 64 | getopt.o |
|
- | 65 | ||
- | 66 | # |
|
- | 67 | # Root rule |
|
- | 68 | # |
|
10 | 69 | $(PROG) : $(OBJS) |
|
- | 70 | $(CC) $(LDFLAGS) $(OBJS) -o $(PROG) |
|
- | 71 | ||
- | 72 | # |
|
- | 73 | # acpisrc source |
|
- | 74 | # |
|
- | 75 | ascase.o : $(ACPICA_TOOLS)/acpisrc/ascase.c |
|
- | 76 | $(COMPILE) |
|
- | 77 | ||
- | 78 | asconvrt.o : $(ACPICA_TOOLS)/acpisrc/asconvrt.c |
|
- | 79 | $(COMPILE) |
|
- | 80 | ||
- | 81 | asfile.o : $(ACPICA_TOOLS)/acpisrc/asfile.c |
|
- | 82 | $(COMPILE) |
|
- | 83 | ||
- | 84 | asmain.o : $(ACPICA_TOOLS)/acpisrc/asmain.c |
|
- | 85 | $(COMPILE) |
|
- | 86 | ||
- | 87 | asremove.o : $(ACPICA_TOOLS)/acpisrc/asremove.c |
|
- | 88 | $(COMPILE) |
|
- | 89 | ||
- | 90 | astable.o : $(ACPICA_TOOLS)/acpisrc/astable.c |
|
- | 91 | $(COMPILE) |
|
- | 92 | ||
- | 93 | asutils.o : $(ACPICA_TOOLS)/acpisrc/asutils.c |
|
- | 94 | $(COMPILE) |
|
- | 95 | ||
- | 96 | # |
|
- | 97 | # ACPICA core source - common |
|
- | 98 | # |
|
- | 99 | getopt.o : $(ACPICA_COMMON)/getopt.c |
|
- | 100 | $(COMPILE) |
|
- | 101 | ||
- | 102 | # |
|
- | 103 | # Unix OS services layer (OSL) |
|
- | 104 | # |
|
- | 105 | osunixdir.o : $(ACPICA_OSL)/osunixdir.c |
|
Line 11... | Line -... | ||
11 | CLEANFILES= $(PROG) |
- | |
Line 12... | Line 106... | ||
12 | 106 | $(COMPILE) |
|
13 | clean : |
107 | |
Line -... | Line 108... | ||
- | 108 | ||
- | 109 | clean : |