Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Merge branch 'devel'
[palacios.git] / kitten / user / Make.rules
1 # Copyright (c) 2008, Sandia National Laboratories
2
3 #
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.
7 #
8 # Typical usage:
9 #       $(call build,FOO,$filename,\
10 #               foo -flags $filename \
11 #       )
12 #
13 build = \
14         @if [ "$(V)" != 1 ]; then \
15                 echo '  $1'; \
16         else \
17                 echo "$2"; \
18         fi; \
19         $2
20
21 #
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.
26 #
27 # Typical usage:
28 #       $(call buildlib,libfoo.a,$(FILES))
29 #
30 buildlib = \
31         $(call build,AR      $1,\
32                 $(RM) $1; \
33                 $(AR) crs $1 $2; \
34         )
35
36 buildprog = \
37         $(call build,LD      $1,\
38                 $(RM) $1; \
39                 $(CC) -static -o $1 $2; \
40         )
41
42 #
43 # Build the .o files from the sources.
44 #
45 %.o: %.c
46         $(call build,CC      $@,$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<)
47
48 all: $(PROGS-y) $(LIBS-y)
49
50 clean: FORCE
51         $(call build,CLEAN      $(PROGS-y) $(LIBS-y) $(OBJS-y), \
52                 $(RM) $(PROGS-y) $(LIBS-y) $(OBJS-y); \
53         )
54
55 FORCE: