2 ### Class Proto: Create a proto file ##########################################
10 my $class = ref($proto) || $proto;
12 $self->{SFD
} = $params{'sfd'};
13 bless ($self, $class);
19 my $sfd = $self->{SFD
};
21 my $base = $$sfd{'base'};
22 my $basename = $$sfd{'basename'};
23 my $BASENAME = $$sfd{'BASENAME'};
24 my $BaseName = $$sfd{'BaseName'};
25 my $basetype = $$sfd{'basetype'};
27 print "/* Automatically generated header! Do not edit! */\n";
29 print "#ifndef PROTO_${BASENAME}_H\n";
30 print "#define PROTO_${BASENAME}_H\n";
32 print "#include <clib/${basename}_protos.h>\n";
34 print "#ifndef _NO_INLINE\n";
35 print "# if defined(__GNUC__)\n";
36 print "# ifdef __AROS__\n";
37 print "# include <defines/${basename}.h>\n";
39 print "# include <inline/${basename}.h>\n";
42 print "# include <pragmas/${basename}_pragmas.h>\n";
44 print "#endif /* _NO_INLINE */\n";
48 print "#ifdef __amigaos4__\n";
49 print "# include <interfaces/${basename}.h>\n";
50 print "# ifndef __NOGLOBALIFACE__\n";
51 print " extern struct ${BaseName}IFace *I${BaseName};\n";
52 print "# endif /* __NOGLOBALIFACE__*/\n";
53 print "#else /* !__amigaos4__ */\n";
54 print "# ifndef __NOLIBBASE__\n";
55 print " extern ${basetype}\n";
56 print "# ifdef __CONSTLIBBASEDECL__\n";
57 print " __CONSTLIBBASEDECL__\n";
58 print "# endif /* __CONSTLIBBASEDECL__ */\n";
60 print "# endif /* !__NOLIBBASE__ */\n";
61 print "#endif /* !__amigaos4__ */\n";
67 # Nothing to do here ...
72 my $sfd = $self->{SFD
};
74 print "#endif /* !PROTO_$$sfd{'BASENAME'}_H */\n";