GNADE User's Guide: GNADE, The GNat Ada Database Environment; Version 1.5.0; Document Revision $Revision: 1.42 $ | ||
---|---|---|
Prev | Next |
The program listing below shows a minimal Makefile which compile the source file nobel.gpq with embessed SQL code into a program with the name nobel_co (see samples/standalone).
Example 12-1. A minimal Makefile
ESQLFLAGS = $(DEBUG) -v -s -pedantic $(FLAGS) # use always the local esql translator ESQL=gesql DBUSER=gnade DBPASSWD=gnade DBSOURCE=gnade DBAUTH= -DDBUSER=\"$(DBUSER)\" \ -DDBPASSWD=\"$(DBPASSWD)\" \ -DDBSOURCE=\"$(DBSOURCE)\" ## ## New compiler rule ## .SUFFIXES: .adb .gpq .gpq.adb: $(ESQL) $(ESQLFLAGS) $(DBAUTH) $*.gpq all :: nobel_co ## ## nobel_co ## nobel.adb: nobel.gpq nobel_co: nobel_co.adb nobel.adb nobel.ads gnatmake nobel_co -o nobel_co `gnade-config --libs` ### clean: rm -rf $(PROGRAMS) b~*.* *.o *.ali core *~ *~*~ bb.out rm -rf nobel.adb