This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
linker flags in generated makefiles should probably be defined in LDFLAGS. This seems to be standard.
See also http://www.netbeans.org/issues/show_bug.cgi?id=115289