1 # $DragonFly: src/gnu/usr.bin/cc34/cc_tools/gengtype/Makefile,v 1.2 2004/06/20 00:20:28 joerg Exp $
3 .include "../Makefile.inc"
4 .include "../../Makefile.langs"
6 SPREPDIR= ${.CURDIR}/../../cc_prep
9 SRCS= gengtype.c gtyp-gen.h gengtype-lex.l gengtype-yacc.y insn-modes.h
10 SRCS+= safe-ctype.c xexit.c xmalloc.c xmemdup.c xstrdup.c
13 CLEANFILES+= gtyp-gen.h
18 host_xm_file_list= ${SPREPDIR}/dragonfly-native.h
19 host_xm_file_list+= ${GCCDIR}/include/ansidecl.h
20 HASHTAB_H = ${GCCDIR}/include/hashtab.h
21 SPLAY_TREE_H= ${GCCDIR}//include/splay-tree.h
24 # platform specific files
25 tm_file_list= $(srcdir)/config/i386/i386.h $(srcdir)/config/i386/unix.h
26 tm_file_list+= $(srcdir)/config/i386/att.h $(srcdir)/config/dbxelf.h
27 tm_file_list+= $(srcdir)/config/elfos.h ${SPREPDIR}/config/dragonfly-spec.h
28 tm_file_list+= ${SPREPDIR}/config/dragonfly.h ${SPREPDIR}/config/i386/dragonfly.h
29 tm_file_list+= $(srcdir)/defaults.h
30 out_file= $(srcdir)/config/i386/i386.c
32 GTFILES_SRCDIR = $(srcdir)
34 gtyp-gen.h: Makefile ../../Makefile.langs
35 echo "/* This file is machine generated. Do not edit. */" > gtyp-gen.h
36 echo "static const char *const srcdir = " >> gtyp-gen.h
37 echo "\"$(GTFILES_SRCDIR)\"" >> gtyp-gen.h
38 echo ";" >> gtyp-gen.h
39 echo "static const char *const lang_files[] = {" >> gtyp-gen.h
40 ll="$(GTFILES_FILES_FILES)"; \
42 echo "\"$$f\", "; done >> gtyp-gen.h
43 echo "NULL};" >> gtyp-gen.h
44 echo "static const char *const langs_for_lang_files[] = {" >> gtyp-gen.h
45 ff="$(GTFILES_FILES_LANGS)"; \
47 echo "\"$$f\", " ; done >> gtyp-gen.h
48 echo "NULL};" >> gtyp-gen.h
49 echo "static const char *const all_files[] = {" >> gtyp-gen.h
52 echo "\"$$f\", "; done >> gtyp-gen.h
53 echo " NULL};" >> gtyp-gen.h
54 echo "static const char *const lang_dir_names[] = { \"c\", " >> gtyp-gen.h
55 gf="$(GTFILES_LANG_DIR_NAMES)"; \
57 echo "\"$$l\", "; done >> gtyp-gen.h
58 echo "NULL};" >> gtyp-gen.h
60 .include <bsd.hostprog.mk>