aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aicasm/Makefile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/scsi/aic7xxx/aicasm/Makefile
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'drivers/scsi/aic7xxx/aicasm/Makefile')
-rw-r--r--drivers/scsi/aic7xxx/aicasm/Makefile78
1 files changed, 78 insertions, 0 deletions
diff --git a/drivers/scsi/aic7xxx/aicasm/Makefile b/drivers/scsi/aic7xxx/aicasm/Makefile
new file mode 100644
index 000000000000..8c91fda6482c
--- /dev/null
+++ b/drivers/scsi/aic7xxx/aicasm/Makefile
@@ -0,0 +1,78 @@
1PROG= aicasm
2
3.SUFFIXES= .l .y .c .h
4
5CSRCS= aicasm.c aicasm_symbol.c
6YSRCS= aicasm_gram.y aicasm_macro_gram.y
7LSRCS= aicasm_scan.l aicasm_macro_scan.l
8
9GENHDRS= aicdb.h $(YSRCS:.y=.h)
10GENSRCS= $(YSRCS:.y=.c) $(LSRCS:.l=.c)
11
12SRCS= ${CSRCS} ${GENSRCS}
13LIBS= -ldb
14clean-files:= ${GENSRCS} ${GENHDRS} $(YSRCS:.y=.output) $(PROG)
15# Override default kernel CFLAGS. This is a userland app.
16AICASM_CFLAGS:= -I/usr/include -I.
17YFLAGS= -d
18
19NOMAN= noman
20
21ifneq ($(HOSTCC),)
22AICASM_CC= $(HOSTCC)
23else
24AICASM_CC= $(CC)
25endif
26
27ifdef DEBUG
28CFLAGS+= -DDEBUG -g
29YFLAGS+= -t -v
30LFLAGS= -d
31endif
32
33$(PROG): ${GENHDRS} $(SRCS)
34 $(AICASM_CC) $(AICASM_CFLAGS) $(SRCS) -o $(PROG) $(LIBS)
35
36aicdb.h:
37 @if [ -e "/usr/include/db4/db_185.h" ]; then \
38 echo "#include <db4/db_185.h>" > aicdb.h; \
39 elif [ -e "/usr/include/db3/db_185.h" ]; then \
40 echo "#include <db3/db_185.h>" > aicdb.h; \
41 elif [ -e "/usr/include/db2/db_185.h" ]; then \
42 echo "#include <db2/db_185.h>" > aicdb.h; \
43 elif [ -e "/usr/include/db1/db_185.h" ]; then \
44 echo "#include <db1/db_185.h>" > aicdb.h; \
45 elif [ -e "/usr/include/db/db_185.h" ]; then \
46 echo "#include <db/db_185.h>" > aicdb.h; \
47 elif [ -e "/usr/include/db_185.h" ]; then \
48 echo "#include <db_185.h>" > aicdb.h; \
49 else \
50 echo "*** Install db development libraries"; \
51 fi
52
53clean:
54 rm -f $(clean-files)
55
56# Create a dependency chain in generated files
57# to avoid concurrent invocations of the single
58# rule that builds them all.
59aicasm_gram.c: aicasm_gram.h
60aicasm_gram.c aicasm_gram.h: aicasm_gram.y
61 $(YACC) $(YFLAGS) -b $(<:.y=) $<
62 mv $(<:.y=).tab.c $(<:.y=.c)
63 mv $(<:.y=).tab.h $(<:.y=.h)
64
65# Create a dependency chain in generated files
66# to avoid concurrent invocations of the single
67# rule that builds them all.
68aicasm_macro_gram.c: aicasm_macro_gram.h
69aicasm_macro_gram.c aicasm_macro_gram.h: aicasm_macro_gram.y
70 $(YACC) $(YFLAGS) -b $(<:.y=) -p mm $<
71 mv $(<:.y=).tab.c $(<:.y=.c)
72 mv $(<:.y=).tab.h $(<:.y=.h)
73
74aicasm_scan.c: aicasm_scan.l
75 $(LEX) $(LFLAGS) -o$@ $<
76
77aicasm_macro_scan.c: aicasm_macro_scan.l
78 $(LEX) $(LFLAGS) -Pmm -o$@ $<