Subversion Repositories Kolibri OS

Rev

Rev 1498 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2216 Serge 1
#
2
# acpisrc - ACPICA source code conversion utility
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
#
1498 serge 8
 
2216 Serge 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
#
18
PROG = acpisrc
1498 serge 19
 
2216 Serge 20
HOST =          _LINUX
21
NOMAN =         YES
22
COMPILE =       $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $?
1498 serge 23
 
2216 Serge 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)
1498 serge 32
 
2216 Serge 33
CFLAGS+= \
34
    -D$(HOST) \
35
    -D_GNU_SOURCE \
36
    -DACPI_SRC_APP \
37
    -I$(ACPICA_SRC)/include \
38
    -I.
1498 serge 39
 
2216 Serge 40
CWARNINGFLAGS = \
41
    -ansi \
42
    -Wall \
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
1498 serge 54
 
2216 Serge 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
1498 serge 65
 
2216 Serge 66
#
67
# Root rule
68
#
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
106
	$(COMPILE)
107
 
108
 
109
clean :
110
	rm -f $(PROG) $(PROG) $(OBJS)
111
 
112
install :
113
	$(INSTALLPROG)