The build system knows how to deal with lex files, but it treats them as c++, so make spec.lex
conform to that.
diff --git a/spec.h b/spec.h
new file mode 100644
index 0000000..b474dca
--- /dev/null
+++ b/spec.h
@@ -0,0 +1,38 @@
+#ifndef SPEC_H
+#define SPEC_H
+
+#if __cplusplus
+extern "C" {
+#endif
+
+extern int num_lines;
+
+typedef struct {
+  int isConst;
+  int type;
+  int bits;
+  int ptrLevel;
+  char name[256];
+  char typeName[256];
+} VarType;
+
+extern VarType *currType;
+
+typedef struct {
+  char name[256];
+  int sync;
+  int paramCount;
+  VarType ret;
+  VarType params[16];
+} ApiEntry;
+
+extern ApiEntry apis[128];
+extern int apiCount;
+
+extern int typeNextState;
+
+#if __cplusplus
+} // extern "C"
+#endif
+
+#endif // SPEC_H