[GRASS5] Gmakefile question

Laura I. Toma laura at cs.duke.edu
Wed Jan 15 14:20:26 EST 2003


I am trying to write a Gmakefile that creates two executables, A and B.
A and B are identical, except that they should be compiled with different
flags.

CFLAGS += ...

all: A B

#OBJ should be compiled with -DELEV_FLOAT
A: $(OBJ)
   $(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)

#OBJ should be compiled with -DELEV_SHORT
B: $(OBJ)
   $(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)


the .o files in OBJ are compiled using CFLAGS. Anybody knows how to change
the CFLAGS inside a rule? or how to get around this?


thanks,
-Laura




More information about the grass-dev mailing list