replace argp with getopt
update gitignore, add automake and C specific stuff
remove unused c files