Use our specs, not FreeBSD's.
[dragonfly.git] / gnu / usr.bin / cc34 / cc_tools / gengtype / Makefile
1 # $DragonFly: src/gnu/usr.bin/cc34/cc_tools/gengtype/Makefile,v 1.2 2004/06/20 00:20:28 joerg Exp $
2
3 .include "../Makefile.inc"
4 .include "../../Makefile.langs"
5
6 SPREPDIR=       ${.CURDIR}/../../cc_prep
7
8 PROG=   gengtype
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
11 LDADD=  -ly
12
13 CLEANFILES+=    gtyp-gen.h
14
15 # from gcc/Makefile
16 srcdir= ${GCCDIR}/gcc
17
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
22
23 # XXX move this
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
31
32 GTFILES_SRCDIR = $(srcdir)
33
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)"; \
41         for f in $$ll; do \
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)"; \
46         for f in $$ff; do \
47         echo "\"$$f\", " ; done  >> gtyp-gen.h
48         echo "NULL};" >> gtyp-gen.h
49         echo "static const char *const all_files[] = {" >> gtyp-gen.h
50         gf="$(GTFILES)"; \
51         for f in $$gf; do \
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)"; \
56         for l in $$gf; do \
57         echo "\"$$l\", "; done >> gtyp-gen.h
58         echo "NULL};" >> gtyp-gen.h
59
60 .include <bsd.hostprog.mk>