move -lc to LDFLAGS
merge into gui