blob: 18b1939130b527062c7b60d5b16ec18870b72d3b [file] [log] [blame]
robbiewc28353f2003-01-10 20:04:06 +00001# To cross compile, override one or more of CC, AR, CROSS_CFLAGS,
robbiew01e94ed2003-06-10 22:00:26 +00002# LOADLIBES, LDFLAGS, & LIB_DIR and be sure to always build from the top level.
robbiewc28353f2003-01-10 20:04:06 +00003#
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__" \
robbiewc28353f2003-01-10 20:04:06 +00008# LDFLAGS=-static \
9# LOADLIBES="-lpthread -lc -lresolv -lnss_dns -lnss_files -lm -lc"
10#
11# Alternately, to override them by editing this file, uncomment the
12# following lines:
robbiew01e94ed2003-06-10 22:00:26 +000013# CROSS_COMPILER=/opt/ppc64/powerpc64-linux/bin/powerpc64-linux-
14# CROSS_CFLAGS= -mpowerpc64
robbiewc28353f2003-01-10 20:04:06 +000015# LDFLAGS=-static
16# LOADLIBES=-lpthread -lc -lresolv -lnss_dns -lnss_files -lm -lc
robbiew01e94ed2003-06-10 22:00:26 +000017# LIB_DIR=/lib64
vapier1400d642006-02-24 02:16:55 +000018# export LOADLIBES LIB_DIR
robbiewc28353f2003-01-10 20:04:06 +000019#
vapierd4e145e2006-02-11 04:33:08 +000020# Or, you can save all your settings into the local 'config.mk' file.
21# Just use the same syntax as above for the Makefile.
22#
vapier847ee1c2006-06-22 04:16:59 +000023# uClinux Users: make sure you add -DUCLINUX to your CFLAGS
24#
robbiewc28353f2003-01-10 20:04:06 +000025# Note: If you override a variable from the commandline all
26# assignments to it in the Makefiles will be ignored. To set it both
27# in the commandline and in the Makefiles use a dummy variable like in
28# CFLAGS
alaffincc2e5552000-07-27 17:13:18 +000029
vapier1400d642006-02-24 02:16:55 +000030ifdef CROSS_COMPILE
31CROSS_COMPILER = $(CROSS_COMPILE)
32endif
33ifdef CROSS_COMPILER
34CC=$(CROSS_COMPILER)gcc
35AR=$(CROSS_COMPILER)ar
36endif
vapierd4e145e2006-02-11 04:33:08 +000037
vapier1400d642006-02-24 02:16:55 +000038export CFLAGS += -Wall $(CROSS_CFLAGS)
39export CC AR LDFLAGS
40
41-include config.mk
alaffincc2e5552000-07-27 17:13:18 +000042
robbiewa2592be2001-10-12 20:49:09 +000043all: libltp.a
nstrazf307d5f2000-09-14 21:54:44 +000044 @$(MAKE) -C pan $@
plars16dc53f2002-01-29 20:48:08 +000045 @$(MAKE) -C testcases $@
iyermanoj96526092002-12-12 16:08:47 +000046 @$(MAKE) -C tools $@
plars16dc53f2002-01-29 20:48:08 +000047 @echo
48 @echo "***********************************************"
49 @echo "** You now need to do a make install as root **"
50 @echo "***********************************************"
51
52install: all
plars41c51212001-08-28 15:45:34 +000053 @$(MAKE) -C testcases install
iyermanoj640d83c2002-12-20 20:00:36 +000054 @$(MAKE) -C tools install
robbiew877d1882003-04-23 19:50:15 +000055 @./IDcheck.sh
alaffincc2e5552000-07-27 17:13:18 +000056
57libltp.a:
58 @$(MAKE) -C lib $@
59
robbiewd34d5812005-07-11 22:28:09 +000060uclinux: uclinux_libltp.a
61 #@$(MAKE) -C pan all
62 @$(MAKE) -C testcases uclinux
63 @$(MAKE) -C tools all
64 @echo
65 @echo "*******************************************************"
66 @echo "** You now need to do a make uclinux_install as root **"
67 @echo "*******************************************************"
68
69uclinux_install: uclinux
70 @$(MAKE) -C testcases uclinux_install
71 @$(MAKE) -C tools install
72 @./IDcheck.sh
73
74uclinux_libltp.a:
75 @$(MAKE) -C lib UCLINUX=1 libltp.a
76
robbiew0d777172003-04-25 16:00:26 +000077menuconfig:
78 @./ltpmenu
79
alaffincc2e5552000-07-27 17:13:18 +000080clean:
81 @$(MAKE) -C lib $@
nstrazf307d5f2000-09-14 21:54:44 +000082 @$(MAKE) -C pan $@
nstraz00f6d192001-01-22 18:05:27 +000083 @$(MAKE) -C tools $@
plars41c51212001-08-28 15:45:34 +000084 @$(MAKE) -C testcases $@