source: git/dyn_modules/tools/Makefile.in @ 7fe9e13

spielwiese
Last change on this file since 7fe9e13 was 7fe9e13, checked in by Oleksandr Motsak <motsak@…>, 10 years ago
Renamed NDEBUG -> SING_NDEBUG in order to avoid confusion with GCC macro
  • Property mode set to 100644
File size: 974 bytes
Line 
1#
2#
3#
4CFLAGS  += -g -I../include -I../../Singular -DSING_NDEBUG -DMODULE_GENERATOR
5LIBS    += -L/usr/local/lib -lgmp
6
7OBJS    = scanner.o misc.o
8
9#       iparith.o febase.o \
10#       mmalloc.o mmallocb.o mminit.o mmutil.o mmblock.o mmspec.o
11
12# subexpr.o
13
14all     = modgen
15
16.cc.o:
17        gcc -c ${CFLAGS} $<
18
19.c.o:
20        gcc -c ${CFLAGS} $<
21
22modgen: ${OBJS} modgen.h decl.inc typmap.h
23        gcc -o $@ ${CFLAGS} ${OBJS} ${LIBS}
24
25scanner.cc: scanner.l
26        flex -oscanner.cc scanner.l
27
28#       flex -Pyymod -oscanner.cc scanner.l
29
30clean:
31        rm -f a.out *~ scanner.cc *.o core
32
33decl.inc: ../../Singular/grammar.h ../../Singular/tok.h
34        -echo "/* declaration for modgen.cc */" > $@
35        -grep "^#define" ../../Singular/grammar.h | awk \
36                '{print "\tcase "$$2": strcpy(name,\""$$2"\"); break;"}' >> $@
37        -echo "" >> $@
38        -echo "/* declaration from tok.h */" >> $@
39        -grep "^  [A-Z_]*," ../../Singular/tok.h | sed "s/,//g" | awk \
40                '{print "\tcase "$$1": strcpy(name,\""$$1"\"); break;"}'>>$@
41
42scanner.l:      modgen.h
43scanner.cc:     scanner.l
44
Note: See TracBrowser for help on using the repository browser.