source: git/dyn_modules/modgen/Makefile.in @ 08a955

fieker-DuValspielwiese
Last change on this file since 08a955 was 5fdf7a, checked in by Max Horn <max@…>, 11 years ago
Replace --no-{rtti,exceptions} by -fno-{rtti,exceptions} This improves compatibility with clang. Moreover, to the best of my knowledge, the --no-* variants are undocumented to start with. At least the GCC manuals for all versions from 2.95.3 till 4.7.2 only list the -fno-* variants, as far as I could tell.
  • Property mode set to 100644
File size: 4.1 KB
Line 
1#
2#
3#
4topsrcdir       = @top_srcdir@
5srcdir          = @srcdir@
6prefix          = @prefix@
7exec_prefix     = @exec_prefix@
8libdir          = @libdir@
9includedir      = @includedir@
10# program executable goes here
11bindir          = @bindir@
12install_bindir  = @bindir@
13# Singular libs go here
14includedir      = @includedir@
15MOD_DEST        = ./include
16INC_SRC         = $(topsrcdir)/Singular
17
18##
19## various programs
20##
21@SET_MAKE@
22CC              = @CC@
23LD              = @LD@
24CXX             = @CXX@
25LEX             = sh ../../Singular/flexer.sh
26PERL            = @PERL@
27BISON           = bison
28
29SINGUNAME       = @SINGUNAME@
30SING_UNAME      = @SING_UNAME@
31SINGULAR_VERSION = @SINGULAR_VERSION@
32S_VERSION       = $${SINGULAR_VERSION-@SINGULAR_VERSION@}
33DISTROOT_NAME   = Singular-${S_VERSION}
34BINDIST_NAME    = ${DISTROOT_NAME}-${SINGUNAME}
35SHAREDIST_NAME  = ${DISTROOT_NAME}-share
36MKINSTALLDIRS   = ../mkinstalldirs
37LN_S            = @LN_S@
38INSTALL         = $(INSTALL_SH)
39INSTALL_PROGRAM = @INSTALL_PROGRAM@
40INSTALL_DATA    = @INSTALL_DATA@
41INSTALL_SH      = $(topsrcdir)/@ac_install_sh@
42MODGEN          = $(bindir)/modgen
43
44##
45## compiler and linker options
46##
47CFLAGS  += -fno-rtti -fno-exceptions -O3 -w -fomit-frame-pointer -pipe -fno-implicit-templates \
48        -g -I${includedir} -I../include -I${topsrcdir}/.. -DNDEBUG -DMODULE_GENERATOR \
49        -D${SING_UNAME}
50LIBS    += -L/usr/local/lib
51
52OBJS    = main.o mod_grammar.o scanner.o misc.o makefile.o utils.o \
53        creat_top.o proc.o proc_setup.o getopt.o getopt1.o
54
55############################################################
56###
57###
58############################################################
59all     = modgen
60
61modgen: pathnames.h ${OBJS} modgen.h decl.inc typmap.h stype.h
62        $(LD) -o $@ ${CFLAGS} ${OBJS} ${LIBS}
63
64install bindist: modgen
65        ${MKINSTALLDIRS} ${bindir}
66        ${INSTALL_PROGRAM} modgen ${bindir}/modgen-${SINGULAR_VERSION}
67        rm -f ${bindir}/modgen
68        cd ${bindir}; ${LN_S} modgen-${SINGULAR_VERSION} modgen
69
70install-bindist: modgen
71        ${MKINSTALLDIRS} ${install_bindir}
72        ${INSTALL_PROGRAM} modgen ${install_bindir}/modgen-${SINGULAR_VERSION}
73        rm -f ${install_bindir}/modgen
74        cd ${install_bindir}; ${LN_S} modgen-${SINGULAR_VERSION} modgen
75
76############################################################
77###
78###
79############################################################
80.SUFFIXES: .o .so .dll .lo .y
81
82.cc.o:
83        $(CXX) -c ${CFLAGS} $<
84
85.c.o:
86        $(CC) -c ${CFLAGS} $<
87
88.y.cc:
89        @if test -r mod_grammar.cc; then \
90                touch mod_grammar.cc ;\
91        else \
92        if test "x${BISON}" = x; then \
93                echo Error: no bison given, could not rebuilt grammar.cc;\
94                exit 1; \
95        fi;\
96        ${BISON} -d -t -o mod_grammar.cc $<;\
97        ./mvbison;\
98        fi
99
100pathnames.h:
101        echo "/*" > pathnames.h
102        echo " *" >> pathnames.h
103        echo " */" >> pathnames.h
104        echo "" >> pathnames.h
105        echo "#define TOPSRCDIR \"$(topsrcdir)\"" >> pathnames.h
106        echo "#define SINGUNAME \"$(SINGUNAME)\"" >> pathnames.h
107
108scanner.cc: scanner.l mod_grammar.h modgen.h
109        @if test -r scanner.cc; then \
110                touch scanner.cc ;\
111        else \
112        if test "x${LEX}" = x; then \
113                echo Error: no lex given, could not rebuilt scanner.cc;\
114                exit 1; \
115        fi;\
116        fi
117        ${LEX} -s -I -t scanner.l > scanner.cc.lmp
118        cp scanner.cc.lmp scanner.cc
119
120#       $(LEX) -Pyymod scanner.l > scanner.cc
121
122############################################################
123###
124###
125############################################################
126clean:
127        rm -f *.o core modgen
128        rm -f decl.inc
129        rm -f pathnames.h
130
131distclean: clean
132        rm -f a.out *~
133        rm -f mod_grammar.cc mod_grammar.h decl.inc
134#       rm -f Makefile
135
136
137#
138#
139#
140test:   modgen
141        rm -rf tmp
142        mkdir tmp
143        ./modgen ../kernel/kernel.mod
144
145#
146#
147#
148decl.inc: ../../Singular/grammar.h ../../Singular/tok.h
149        -echo "/* declaration for modgen.cc */" > $@
150        -grep "^#define" ../../Singular/grammar.h | awk \
151                '{print "\tcase "$$2": strcpy(name,\""$$2"\"); break;"}' >> $@
152        -echo "" >> $@
153        -echo "/* declaration from tok.h */" >> $@
154        -grep "^  [A-Z_]*," ../../Singular/tok.h | sed "s/,//g" | awk \
155                '{print "\tcase "$$1": strcpy(name,\""$$1"\"); break;"}'>>$@
156
157############################################################
158###
159###
160############################################################
161makefile.cc:    pathnames.h
162misc.cc:        modgen.h decl.inc
163utils.cc:       modgen.h
164mod_grammar.cc: mod_grammar.y
165mod_grammar.h:  mod_grammar.y
Note: See TracBrowser for help on using the repository browser.