1 # Copyright (c) 2008, Sandia National Laboratories
4 # The build rules are modelled on the Linux style less-verbose
5 # build by default, but with full details if V=1 flag is
6 # set in the environment or on the build line.
9 # $(call build,FOO,$filename,\
10 # foo -flags $filename \
14 @if [ "$(V)" != 1 ]; then \
22 # Generate a library .a file from a list of object files.
23 # For consistency of symbol ordering, we do not use ar to do any
24 # updates of the library, but instead remove the old one and
25 # re-generate it from all of its input object files.
28 # $(call buildlib,libfoo.a,$(FILES))
39 $(CC) -static -o $1 $2; \
43 # Build the .o files from the sources.
46 $(call build,CC $@,$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<)
48 all: $(PROGS-y) $(LIBS-y)
51 $(call build,CLEAN $(PROGS-y) $(LIBS-y) $(OBJS-y), \
52 $(RM) $(PROGS-y) $(LIBS-y) $(OBJS-y); \