Index: p/src/tok.l/Makefile
===================================================================
--- app/src/tok.l/Makefile	(revision 8d3e6ab33b2b6727eb54bb3498a0ba2af9ca9ea1)
+++ 	(revision )
@@ -1,21 +1,0 @@
-PAR=-O3 -m32
-#-static
-
-tok: tok.c cmdline.c
-	cc $(PAR) tok.c cmdline.c -o tok
-
-tok.c: tok.l
-	flex -8 -f -otok.c tok.l
-
-cmdline.c cmdline.h: cmdline_tok.ggo
-	gengetopt -i cmdline_tok.ggo --conf-parser
-
-clean:
-	rm *.c
-	rm cmdline.*
-	rm tok
-
-copy: tok
-ifdef UTT_BIN_DIR
-	cp tok ${UTT_BIN_DIR}
-endif
Index: p/src/tok.l/cmdline_tok.ggo
===================================================================
--- app/src/tok.l/cmdline_tok.ggo	(revision 25ae32e4c2354e0ed6756bbe1de83f39cd814652)
+++ 	(revision )
@@ -1,4 +1,0 @@
-package "tok"
-version "0.1"
-
-option "interactive"		i	"Interactive mode." flag off
Index: p/src/tok.l/tok.l
===================================================================
--- app/src/tok.l/tok.l	(revision 635ee523336cbb0f728f20ea28a3ed5711a8b45a)
+++ 	(revision )
@@ -1,70 +1,0 @@
-%{
-	#include <stdio.h>
-	#include <locale.h>
-	#include "cmdline.h"
-
-	int filepos=0;
-
-	struct gengetopt_args_info args;
-
-%}
-
-
-%%
-
-[a-zA-Z±æê³ñó¶¿Œ¡ÆÊ£ÑÓŠ¯¬]{1,64}	{
-					printf("%04d %02d W %s\n", filepos, yyleng, yytext);
-					filepos+=yyleng;
-					if(args.interactive_flag) fflush(stdout);
-				}
-
-[[:digit:]]{1,64}		{
-					printf("%04d %02d N %s\n", filepos, yyleng, yytext);
-					filepos+=yyleng;
-					if(args.interactive_flag) fflush(stdout);
-				}
-
-[[:space:]\n]{1,64}			{
-					int i;
-					printf("%04d %02d S ", filepos, yyleng);
-					for(i=0; i<yyleng; ++i)
-						switch(yytext[i])
-						{
-							case ' ' : putchar('_'); break;
-							case '\t': printf("\\t"); break;
-							case '\n': printf("\\n"); break;
-							case '\r': printf("\\t"); break;
-							case '\f': printf("\\n"); break;
-						}
-					putchar('\n');
-					filepos+=yyleng;
-					if(args.interactive_flag) fflush(stdout);
-				}
-
-[[:punct:]]			{
-					printf("%04d %02d P %c\n", filepos, yyleng, *yytext);
-					filepos+=yyleng;
-					if(args.interactive_flag) fflush(stdout);
-				}
-
-.				{
-					printf("%04d %02d B \\x%02X\n", filepos, yyleng, (unsigned char)*yytext);
-					filepos+=yyleng;
-					if(args.interactive_flag) fflush(stdout);
-				}
-
-%%
-
-main(int argc, char** argv)
-{
-  if (cmdline_parser(argc, argv, &args) != 0) exit(1);
-  setlocale(LC_CTYPE,"");
-  setlocale(LC_COLLATE,"");
-  yylex();
-}
-
-int yywrap()
-{
-	return 1;
-}
-
Index: auto/output/Makefile
===================================================================
--- auto/output/Makefile	(revision 44f59b8b510ac7c3b21f669b0d25ed4cb4201f3f)
+++ auto/output/Makefile	(revision 12743b9e8ce96f3f0d743ab0459dacbc0fe2690c)
@@ -3,5 +3,5 @@
 cat << EOF > Makefile
 # Default target
-.DEFAULT: all
+.DEFAULT_GOAL = all
 
 SHELL = $SHELL
@@ -44,6 +44,10 @@
 
 PROGRAMS = tok
+
 TOK_OBJ_FILES = tok.o tok_cmdline.o
 TOK_FLEX_FILES = tok.l
+TOK_GGO_FILES = tok_cmdline.ggo
+tok.o: tok_cmdline.h
+
 CONFIG_FILES = src/config.h Makefile
 
@@ -51,7 +55,11 @@
 .SUFFIXES: .l .y .h .c .o
 
+.INTERMEDIATE: \$(patsubst %.l,%.c,\$(TOK_FLEX_FILES))
+.INTERMEDIATE: \$(patsubst %.ggo,%.c,\$(TOK_GGO_FILES))
+.INTERMEDIATE: \$(patsubst %.ggo,%.h,\$(TOK_GGO_FILES))
+
 .PHONY: all
 all: \$(PROGRAMS)
-	#make -C app compile
+
 
 .PHONY: help
@@ -70,5 +78,6 @@
 	\$(RM) \$(TOK_OBJ_FILES)
 	\$(RM) \$(patsubst %.l,%.c,\$(TOK_FLEX_FILES))
-	#make -C app clean
+	\$(RM) \$(patsubst %.ggo,%.c,\$(TOK_GGO_FILES))
+	\$(RM) \$(patsubst %.ggo,%.h,\$(TOK_GGO_FILES))
 
 .PHONY: distclean
@@ -87,6 +96,12 @@
 	\$(CC) -c \$< -o \$@ \$(ALL_CFLAGS)
 
-%.o: %.l
+%.c: %.l
 	\$(FLEX) -t \$< > \$@
+
+%.c: %.ggo
+	gengetopt --input $< --file-name \$(patsubst %.c,%,\$@) --conf-parser
+
+%.h: %.ggo
+	gengetopt --input $< --file-name \$(patsubst %.h,%,\$@) --conf-parser
 
 %: %.o
Index: src/tok.l
===================================================================
--- src/tok.l	(revision 12743b9e8ce96f3f0d743ab0459dacbc0fe2690c)
+++ src/tok.l	(revision 12743b9e8ce96f3f0d743ab0459dacbc0fe2690c)
@@ -0,0 +1,71 @@
+%{
+	#include <stdio.h>
+	#include <locale.h>
+	#include "tok_cmdline.h"
+
+	int filepos=0;
+
+	struct gengetopt_args_info args;
+
+%}
+
+
+%%
+
+[a-zA-Z±æê³ñó¶¿Œ¡ÆÊ£ÑÓŠ¯¬]{1,64}	{
+					printf("%04d %02d W %s\n", filepos, yyleng, yytext);
+					filepos+=yyleng;
+					if(args.interactive_flag) fflush(stdout);
+				}
+
+[[:digit:]]{1,64}		{
+					printf("%04d %02d N %s\n", filepos, yyleng, yytext);
+					filepos+=yyleng;
+					if(args.interactive_flag) fflush(stdout);
+				}
+
+[[:space:]\n]{1,64}			{
+					int i;
+					printf("%04d %02d S ", filepos, yyleng);
+					for(i=0; i<yyleng; ++i)
+						switch(yytext[i])
+						{
+							case ' ' : putchar('_'); break;
+							case '\t': printf("\\t"); break;
+							case '\n': printf("\\n"); break;
+							case '\r': printf("\\t"); break;
+							case '\f': printf("\\n"); break;
+						}
+					putchar('\n');
+					filepos+=yyleng;
+					if(args.interactive_flag) fflush(stdout);
+				}
+
+[[:punct:]]			{
+					printf("%04d %02d P %c\n", filepos, yyleng, *yytext);
+					filepos+=yyleng;
+					if(args.interactive_flag) fflush(stdout);
+				}
+
+.				{
+					printf("%04d %02d B \\x%02X\n", filepos, yyleng, (unsigned char)*yytext);
+					filepos+=yyleng;
+					if(args.interactive_flag) fflush(stdout);
+				}
+
+%%
+
+int main(int argc, char** argv)
+{
+  if (cmdline_parser(argc, argv, &args) != 0) return 1;
+  setlocale(LC_CTYPE,"");
+  setlocale(LC_COLLATE,"");
+  yylex();
+  return 0;
+}
+
+int yywrap()
+{
+	return 1;
+}
+
Index: src/tok_cmdline.ggo
===================================================================
--- src/tok_cmdline.ggo	(revision 12743b9e8ce96f3f0d743ab0459dacbc0fe2690c)
+++ src/tok_cmdline.ggo	(revision 12743b9e8ce96f3f0d743ab0459dacbc0fe2690c)
@@ -0,0 +1,4 @@
+package "tok"
+version "0.1"
+
+option "interactive"		i	"Interactive mode." flag off
