Skip to contentSkip to conversation

aicasm Makefile

PATCH New Bob_Tracy(0000) 1 participant 1 message Feb 18, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 aicasm Makefile

The Makefile for aicasm has been broken since 2.5.48. The order in which objects are specified on the linker command line *is* significant, and if "-ldb" is made part of AICASM_CFLAGS rather than appearing after the "-o $(PROG)", I get an undefined symbol error (__db185_open).

The attached patch is against 2.5.54-2.5.62 inclusive. If anyone is wondering, yes, this is a repeat posting on this subject (original was 1 December 2002).

Signature · 4 lines
-----------------------------------------------------------------------
Bob Tracy                   WTO + WIPO = DMCA? http://www.anti-dmca.org
[email protected]
-----------------------------------------------------------------------
drivers/scsi/aic7xxx/aicasm/Makefile renamed from drivers/scsi/aic7xxx/aicasm/Makefile~ +3 -2
@@ -10,9 +10,10 @@
 GENSRCS=	$(YSRCS:.y=.c) $(LSRCS:.l=.c)
 
 SRCS=	${CSRCS} ${GENSRCS}
+LIBS=	-ldb
 CLEANFILES= ${GENSRCS} ${GENHDRS} $(YSRCS:.y=.output)
 # Override default kernel CFLAGS.  This is a userland app.
-AICASM_CFLAGS:= -I/usr/include -I. -ldb
+AICASM_CFLAGS:= -I/usr/include -I.
 YFLAGS= -d
 
 NOMAN=	noman
@@ -30,7 +31,7 @@
 endif
 
 $(PROG):  ${GENHDRS} $(SRCS)
-	$(AICASM_CC) $(AICASM_CFLAGS) $(SRCS) -o $(PROG)
+	$(AICASM_CC) $(AICASM_CFLAGS) $(SRCS) -o $(PROG) $(LIBS)
 
 aicdb.h:
 	@if [ -e "/usr/include/db3/db_185.h" ]; then		\