OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [drivers/] [scsi/] [aic7xxx/] [aicasm/] [Makefile] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
PROG=   aicasm
2
 
3
.SUFFIXES= .l .y .c .h
4
 
5
CSRCS=  aicasm.c aicasm_symbol.c
6
YSRCS=  aicasm_gram.y aicasm_macro_gram.y
7
LSRCS=  aicasm_scan.l aicasm_macro_scan.l
8
 
9
GENHDRS=        aicdb.h $(YSRCS:.y=.h)
10
GENSRCS=        $(YSRCS:.y=.c) $(LSRCS:.l=.c)
11
 
12
SRCS=   ${CSRCS} ${GENSRCS}
13
LIBS=   -ldb
14
clean-files:= ${GENSRCS} ${GENHDRS} $(YSRCS:.y=.output) $(PROG)
15
# Override default kernel CFLAGS.  This is a userland app.
16
AICASM_CFLAGS:= -I/usr/include -I.
17
YFLAGS= -d
18
 
19
NOMAN=  noman
20
 
21
ifneq ($(HOSTCC),)
22
AICASM_CC= $(HOSTCC)
23
else
24
AICASM_CC= $(CC)
25
endif
26
 
27
ifdef DEBUG
28
CFLAGS+= -DDEBUG -g
29
YFLAGS+= -t -v
30
LFLAGS= -d
31
endif
32
 
33
$(PROG):  ${GENHDRS} $(SRCS)
34
        $(AICASM_CC) $(AICASM_CFLAGS) $(SRCS) -o $(PROG) $(LIBS)
35
 
36
aicdb.h:
37
        @if [ -e "/usr/include/db4/db_185.h" ]; then            \
38
                echo "#include " > aicdb.h;     \
39
         elif [ -e "/usr/include/db3/db_185.h" ]; then          \
40
                echo "#include " > aicdb.h;     \
41
         elif [ -e "/usr/include/db2/db_185.h" ]; then          \
42
                echo "#include " > aicdb.h;     \
43
         elif [ -e "/usr/include/db/db_185.h" ]; then           \
44
                echo "#include " > aicdb.h;     \
45
         elif [ -e "/usr/include/db_185.h" ]; then              \
46
                echo "#include " > aicdb.h;             \
47
         else                                                   \
48
                echo "*** Install db development libraries";    \
49
         fi
50
 
51
clean:
52
        rm -f $(clean-files)
53
 
54
aicasm_gram.c aicasm_gram.h: aicasm_gram.y
55
        $(YACC) $(YFLAGS) -b $(<:.y=) $<
56
        mv $(<:.y=).tab.c $(<:.y=.c)
57
        mv $(<:.y=).tab.h $(<:.y=.h)
58
 
59
aicasm_macro_gram.c aicasm_macro_gram.h: aicasm_macro_gram.y
60
        $(YACC) $(YFLAGS) -b $(<:.y=) -p mm $<
61
        mv $(<:.y=).tab.c $(<:.y=.c)
62
        mv $(<:.y=).tab.h $(<:.y=.h)
63
 
64
aicasm_scan.c: aicasm_scan.l
65
        $(LEX) $(LFLAGS) -o$@ $<
66
 
67
aicasm_macro_scan.c: aicasm_macro_scan.l
68
        $(LEX) $(LFLAGS) -Pmm -o$@ $<

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.