]> granicus.if.org Git - postgresql/blob - src/interfaces/ecpg/preproc/Makefile
1873d13ce978405d2811247bc9833cb8c4d6f20d
[postgresql] / src / interfaces / ecpg / preproc / Makefile
1 SRCDIR= ../../..
2 include $(SRCDIR)/Makefile.global
3
4 MAJOR_VERSION=2
5 MINOR_VERSION=6
6 PATCHLEVEL=12
7
8 CFLAGS+=-I../include -DMAJOR_VERSION=$(MAJOR_VERSION) \
9         -DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL) \
10         -DINCLUDE_PATH=\"$(HEADERDIR)\" -g
11
12 OBJ=preproc.o pgc.o type.o ecpg.o ecpg_keywords.o \
13     keywords.o c_keywords.o ../lib/typename.o
14 #../../../backend/parser/scansup.o
15
16 all:: ecpg
17
18 # Rule that really do something.
19 ecpg: $(OBJ)
20         $(CC) -o ecpg $(OBJ) $(LEXLIB) $(LDFLAGS)
21
22 preproc.c preproc.h: preproc.y
23         $(YACC) $(YFLAGS) $<
24         mv y.tab.c preproc.c
25         mv y.tab.h preproc.h
26
27 pgc.c: pgc.l
28         $(LEX) $<
29         mv lex.yy.c pgc.c
30
31 clean:
32         rm -f *.o core a.out ecpg$(X) *~ *.output
33 # And the garbage that might have been left behind by partial build:
34         rm -f y.tab.c y.tab.h lex.yy.c
35 # make clean does not remove preproc.c, preproc.h, pgc.c since we want
36 # to ship those files in the distribution, for people with inadequate tools.
37
38 install: all
39         $(INSTALL) $(INSTL_EXE_OPTS) ecpg$(X) $(BINDIR)
40
41 uninstall:
42         rm -f $(BINDIR)/ecpg
43
44 preproc.o: preproc.h ../include/ecpgtype.h keywords.c c_keywords.c ecpg_keywords.c
45 type.o: ../include/ecpgtype.h
46 pgc.o: ../include/ecpgtype.h keywords.c c_keywords.c ecpg_keywords.c preproc.h
47 keywords.o: ../include/ecpgtype.h preproc.h
48 c_keywords.o: ../include/ecpgtype.h preproc.h 
49 ecpg_keywords.o: ../include/ecpgtype.h preproc.h 
50