The Makefile

The BDL modules and forms used by the application in this chapter can be compiled and linked in Genero Studio using the Application-level Execute or Build options. If you prefer command line tools you can compile and link using a Makefile. This file is interpreted by the make utility, which is a well-known tool to build large programs based on multiple sources and forms.

The make utility reads the dependency rules defined in the Makefile for each program component, and executes the commands associated with the rules.

This section only describes the Makefile used in this example. For more details about Makefiles, see Using makefiles in the Genero Business Development Language User Guide.

The Makefile:
01  all:: orders 
02
03  orders.42m: orders.4gl 
04          fglcomp -M orders.4gl 
05  
06  orderform.42f: orderform.per 
07          fglform -M orderform.per 
08  
09  custlist.42m: custlist.4gl 
10          fglcomp -M custlist.4gl 
11  
12  custlist.42f: custlist.per 
13          fglform -M custlist.per 
14  
15  stocklist.42m: stocklist.4gl 
16          fglcomp -M stocklist.4gl 
17  
18  stocklist.42f: stocklist.per 
19          fglform -M stocklist.per 
20  
21  MODULES=\
22   orders.42m\
23   custlist.42m\
24   stocklist.42m 
25  
26  FORMS=\
27   orderform.42f\
28   custlist.42f\
29   stocklist.42f 
30  
31  orders:: $(MODULES) $(FORMS)
32        fgllink -o orders.42r $(MODULES)
33  
34  run::
35        fglrun orders 
36  
37  clean::
38          rm -f *.42?
Note: