Doing exercise 33, I bumped into some things that did not work for me. So I will just note it for anyone to benefit from.
- I changed the line
CFLAGS += $(TARGET)to
LDLIBS += $(TARGET). Otherwise I get errors on compile.
- I changed the line with
checkto be one line only. If split with a backslash (as in the book) I get an error about the backslash and make check does not work. Removing the backslash and combining the two lines into one line solved the problem. Be careful not to add extra characters (spaces f.i.) by accident.
Kind regards. Guus.
EDIT: Adding the diff between the c-skeleton/Makefile and ex33/Makefile I have
11c11 < TARGET=build/libYOUR_LIBRARY.a --- > TARGET=build/liblcthw.a 34c34 < tests: CFLAGS += $(TARGET) --- > tests: LDLIBS += $(TARGET) 53,54c53 < @egrep '[^_.>a-zA-Z0-9](str(n?cpy|n?cat|xfrm|n?dup|str|pbrk|tok|_)\ < |stpn?cpy|a?sn?printf|byte_)' $(SOURCES) || true --- > @egrep -n '[^_.>a-zA-Z0-9](str(n?cpy|n?cat|xfrm|n?dup|str|pbrk|tok|_)|stpn?cpy|a?sn?printf|byte_)' $(SOURCES) || true