patch-2.4.19 linux-2.4.19/drivers/scsi/aic7xxx/aicasm/Makefile
Next file: linux-2.4.19/drivers/scsi/aic7xxx/aicasm/aicasm.c
Previous file: linux-2.4.19/drivers/scsi/aic7xxx/aic7xxx_seq.h
Back to the patch index
Back to the overall index
- Lines: 54
- Date:
Fri Aug 2 17:39:44 2002
- Orig file:
linux-2.4.18/drivers/scsi/aic7xxx/aicasm/Makefile
- Orig date:
Thu Oct 25 13:53:49 2001
diff -urN linux-2.4.18/drivers/scsi/aic7xxx/aicasm/Makefile linux-2.4.19/drivers/scsi/aic7xxx/aicasm/Makefile
@@ -1,13 +1,16 @@
PROG= aicasm
-.SUFFIXES= .l .y .c
+.SUFFIXES= .l .y .c .h
CSRCS= aicasm.c aicasm_symbol.c
-GENSRCS= aicasm_gram.c aicasm_scan.c
-GENHDRS= y.tab.h aicdb.h
+YSRCS= aicasm_gram.y aicasm_macro_gram.y
+LSRCS= aicasm_scan.l aicasm_macro_scan.l
-SRCS= ${GENSRCS} ${CSRCS}
-CLEANFILES= ${GENSRCS} ${GENHDRS} y.output
+GENHDRS= aicdb.h $(YSRCS:.y=.h)
+GENSRCS= $(YSRCS:.y=.c) $(LSRCS:.l=.c)
+
+SRCS= ${CSRCS} ${GENSRCS}
+CLEANFILES= ${GENSRCS} ${GENHDRS} $(YSRCS:.y=.output)
# Override default kernel CFLAGS. This is a userland app.
AICASM_CFLAGS:= -I/usr/include -I. -ldb
YFLAGS= -d
@@ -26,7 +29,7 @@
LFLAGS= -d
endif
-$(PROG): $(SRCS) $(GENHDRS)
+$(PROG): ${GENHDRS} $(SRCS)
$(AICASM_CC) $(AICASM_CFLAGS) $(SRCS) -o $(PROG)
aicdb.h:
@@ -45,8 +48,18 @@
clean:
rm -f $(CLEANFILES) $(PROG)
-y.tab.h aicasm_gram.c: aicasm_gram.y
- $(YACC) $(YFLAGS) aicasm_gram.y
- mv y.tab.c aicasm_gram.c
+aicasm_gram.c aicasm_gram.h: aicasm_gram.y
+ $(YACC) $(YFLAGS) -b $(<:.y=) $<
+ mv $(<:.y=).tab.c $(<:.y=.c)
+ mv $(<:.y=).tab.h $(<:.y=.h)
+
+aicasm_macro_gram.c aicasm_macro_gram.h: aicasm_macro_gram.y
+ $(YACC) $(YFLAGS) -b $(<:.y=) -p mm $<
+ mv $(<:.y=).tab.c $(<:.y=.c)
+ mv $(<:.y=).tab.h $(<:.y=.h)
+
+aicasm_scan.c: aicasm_scan.l
+ $(LEX) $(LFLAGS) -o$@ $<
-aicasm_scan.c: y.tab.h
+aicasm_macro_scan.c: aicasm_macro_scan.l
+ $(LEX) $(LFLAGS) -Pmm -o$@ $<
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)