Add a makefile based on several files from pcmcia-cs

This is enough to build pack_cis but not dump_cis yet.
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..6a1ba4e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,48 @@
+CPPFLAGS += -I.
+YFLAGS = -d
+
+SRCS  = dump_cis.c pack_cis.c
+HDRS  = pack_cis.h
+TOOLS = dump_cis pack_cis
+
+all:	$(SRCS) $(HDRS) $(TOOLS)
+
+dump_cis: dump_cis.o
+
+yacc_cis.o: yacc_cis.c
+	$(CC) -MD $(CFLAGS) $(CPPFLAGS) -c $<
+	@mkdir -p .depfiles ; mv $*.d .depfiles
+
+lex_cis.o: lex_cis.c yacc_cis.h
+	$(CC) -MD $(CFLAGS) $(CPPFLAGS) -c $<
+	@mkdir -p .depfiles ; mv $*.d .depfiles
+
+pack_cis: pack_cis.o lex_cis.o yacc_cis.o
+	$(CC) $+ -o $@ -lm
+
+parser: lex_cis.o yacc_cis.c
+	$(CC) $(CFLAGS) $(CPPFLAGS) -DDEBUG -o $@ $+
+
+clean:
+	rm -f core core.* *.o *.s *.a *~ .depend .depfiles/*.d
+	rm -f $(TOOLS)
+
+install: $(TOOLS)
+	@mkdir -p $(PREFIX)/sbin
+	cp -f dump_cis pack_cis $(PREFIX)/sbin
+
+%.c %.h : %.y
+	$(YACC) $(YFLAGS) $<
+	mv y.tab.c $*.c
+	mv y.tab.h $*.h
+
+%.s : %.c
+	$(CC) $(CFLAGS) $(CPPFLAGS) -S $<
+
+# Stuff to automatically maintain dependency files
+
+%.o : %.c
+	$(CC) -MD $(CFLAGS) $(CPPFLAGS) -c $<
+	@mkdir -p .depfiles ; mv $*.d .depfiles
+
+-include $(SRCS:%.c=.depfiles/%.d)