robbiew | c28353f | 2003-01-10 20:04:06 +0000 | [diff] [blame^] | 1 | # To cross compile, override one or more of CC, AR, CROSS_CFLAGS, |
| 2 | # LOADLIBES and LDFLAGS, and be sure to always build from the top level. |
| 3 | # |
| 4 | # To override them from the make commandline, do something like this: |
| 5 | # $ CROSS_COMPILER=/opt/cegl-1.4/hardhat/devkit/ppc/405/bin/powerpc-linux- |
| 6 | # $ make \ |
| 7 | # CROSS_CFLAGS="-mcpu=403 -D__PPC405__" \ |
| 8 | # CC=${CROSS_COMPILER}gcc \ |
| 9 | # AR=${CROSS_COMPILER}ar \ |
| 10 | # LDFLAGS=-static \ |
| 11 | # LOADLIBES="-lpthread -lc -lresolv -lnss_dns -lnss_files -lm -lc" |
| 12 | # |
| 13 | # Alternately, to override them by editing this file, uncomment the |
| 14 | # following lines: |
| 15 | # CROSS_COMPILER=/opt/ppc64/powerpc64-linux/bin/ |
| 16 | # CROSS_CFLAGS= -mcpu=403 -D__PPC405__ |
| 17 | # CC=$(CROSS_COMPILER)gcc |
| 18 | # AR=$(CROSS_COMPILER)ar |
| 19 | # LDFLAGS=-static |
| 20 | # LOADLIBES=-lpthread -lc -lresolv -lnss_dns -lnss_files -lm -lc |
| 21 | # export CC AR LDFLAGS LOADLIBES |
| 22 | # |
| 23 | # Note: If you override a variable from the commandline all |
| 24 | # assignments to it in the Makefiles will be ignored. To set it both |
| 25 | # in the commandline and in the Makefiles use a dummy variable like in |
| 26 | # CFLAGS |
alaffin | cc2e555 | 2000-07-27 17:13:18 +0000 | [diff] [blame] | 27 | |
robbiew | c28353f | 2003-01-10 20:04:06 +0000 | [diff] [blame^] | 28 | CFLAGS = -Wall $(CROSS_CFLAGS) |
alaffin | cc2e555 | 2000-07-27 17:13:18 +0000 | [diff] [blame] | 29 | |
robbiew | a2592be | 2001-10-12 20:49:09 +0000 | [diff] [blame] | 30 | all: libltp.a |
nstraz | f307d5f | 2000-09-14 21:54:44 +0000 | [diff] [blame] | 31 | @$(MAKE) -C pan $@ |
plars | 16dc53f | 2002-01-29 20:48:08 +0000 | [diff] [blame] | 32 | @$(MAKE) -C testcases $@ |
iyermanoj | 9652609 | 2002-12-12 16:08:47 +0000 | [diff] [blame] | 33 | @$(MAKE) -C tools $@ |
plars | 16dc53f | 2002-01-29 20:48:08 +0000 | [diff] [blame] | 34 | @echo |
| 35 | @echo "***********************************************" |
| 36 | @echo "** You now need to do a make install as root **" |
| 37 | @echo "***********************************************" |
| 38 | |
| 39 | install: all |
plars | 41c5121 | 2001-08-28 15:45:34 +0000 | [diff] [blame] | 40 | @$(MAKE) -C testcases install |
iyermanoj | 640d83c | 2002-12-20 20:00:36 +0000 | [diff] [blame] | 41 | @$(MAKE) -C tools install |
robbiew | a2592be | 2001-10-12 20:49:09 +0000 | [diff] [blame] | 42 | ./IDcheck.sh |
alaffin | cc2e555 | 2000-07-27 17:13:18 +0000 | [diff] [blame] | 43 | |
| 44 | libltp.a: |
| 45 | @$(MAKE) -C lib $@ |
| 46 | |
| 47 | clean: |
| 48 | @$(MAKE) -C lib $@ |
nstraz | f307d5f | 2000-09-14 21:54:44 +0000 | [diff] [blame] | 49 | @$(MAKE) -C pan $@ |
nstraz | 00f6d19 | 2001-01-22 18:05:27 +0000 | [diff] [blame] | 50 | @$(MAKE) -C tools $@ |
plars | 41c5121 | 2001-08-28 15:45:34 +0000 | [diff] [blame] | 51 | @$(MAKE) -C testcases $@ |