Define CURDIR before LDFLAGS