remove old code
[AROS.git] / scripts / genmfs
blob5839a2469ad1646a9c92b7f419ce35e9b303f6b7
1 #!/usr/bin/perl
2 # AROS mmakefile.src generator version 0.01a
3 # Jack Patton 2/24/2004
4 # Script to generate a mmakefile.src based upon the .c files in the current directory.
6 $tg = $ARGV[0];
7 if (!$ARGV[0]) {
8 print "Usage: genmfs <project name>\n";
9 exit;
11 open(OUT,">mmakefile.src");
12 print OUT "# \$Id\$\n#\n# Makefile to make $tg.\n\n";
13 print OUT "include \$(TOP)/config/make.cfg\n\n";
14 print OUT "EXEDIR := \$(AROSDIR)\n\n";
15 print OUT "FILES := ";
17 foreach $ln (`ls`) {
18 next if $ln =~ m/mmakefile/;
19 if ($ln =~ m/.c$/) {
20 $ln =~ s/.c$//;
21 $f = $ln;
22 chomp($ln);
23 print OUT "\\\n $ln ";
26 print OUT "\n\nUSER_CFLAGS :=";
27 print OUT "\nUSER_INCLUDES :=";
28 print OUT "\nUSER_LDFLAGS := ";
29 print OUT "\n\n#MM $tg : includes linklibs\n\n";
30 print OUT "%build_prog mmake=$tg \\\n";
31 print OUT " progname=$tg targetdir=\$(EXEDIR) \\\n";
32 print OUT " files=\$(FILES) uselibs=\"\"\n\n";
33 print OUT "%common\n";
34 close(OUT);