blob: 7adb324cade40a6b798d5a16852564b4a724a273 [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__" \
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:
robbiew01e94ed2003-06-10 22:00:26 +000015# CROSS_COMPILER=/opt/ppc64/powerpc64-linux/bin/powerpc64-linux-
16# CROSS_CFLAGS= -mpowerpc64
robbiewc28353f2003-01-10 20:04:06 +000017# CC=$(CROSS_COMPILER)gcc
18# AR=$(CROSS_COMPILER)ar
19# LDFLAGS=-static
20# LOADLIBES=-lpthread -lc -lresolv -lnss_dns -lnss_files -lm -lc
robbiew01e94ed2003-06-10 22:00:26 +000021# LIB_DIR=/lib64
22# export CC AR LDFLAGS LOADLIBES LIB_DIR
robbiewc28353f2003-01-10 20:04:06 +000023#
24# Note: If you override a variable from the commandline all
25# assignments to it in the Makefiles will be ignored. To set it both
26# in the commandline and in the Makefiles use a dummy variable like in
27# CFLAGS
alaffincc2e5552000-07-27 17:13:18 +000028
robbiew32d492b2003-04-29 16:33:31 +000029NPTL:=$(shell getconf GNU_LIBPTHREAD_VERSION 2>/dev/null| grep NPTL; echo $?)
robbiew16c1ca22003-05-01 18:40:17 +000030ifeq ($(NPTL),)
robbiew32d492b2003-04-29 16:33:31 +000031export CFLAGS+= -Wall $(CROSS_CFLAGS)
32else
33export CFLAGS+= -Wall $(CROSS_CFLAGS) -DUSE_NPTL
34endif
35
alaffincc2e5552000-07-27 17:13:18 +000036
robbiewa2592be2001-10-12 20:49:09 +000037all: libltp.a
nstrazf307d5f2000-09-14 21:54:44 +000038 @$(MAKE) -C pan $@
plars16dc53f2002-01-29 20:48:08 +000039 @$(MAKE) -C testcases $@
iyermanoj96526092002-12-12 16:08:47 +000040 @$(MAKE) -C tools $@
plars16dc53f2002-01-29 20:48:08 +000041 @echo
42 @echo "***********************************************"
43 @echo "** You now need to do a make install as root **"
44 @echo "***********************************************"
45
46install: all
plars41c51212001-08-28 15:45:34 +000047 @$(MAKE) -C testcases install
iyermanoj640d83c2002-12-20 20:00:36 +000048 @$(MAKE) -C tools install
robbiew877d1882003-04-23 19:50:15 +000049 @./IDcheck.sh
alaffincc2e5552000-07-27 17:13:18 +000050
51libltp.a:
52 @$(MAKE) -C lib $@
53
robbiew0d777172003-04-25 16:00:26 +000054menuconfig:
55 @./ltpmenu
56
alaffincc2e5552000-07-27 17:13:18 +000057clean:
58 @$(MAKE) -C lib $@
nstrazf307d5f2000-09-14 21:54:44 +000059 @$(MAKE) -C pan $@
nstraz00f6d192001-01-22 18:05:27 +000060 @$(MAKE) -C tools $@
plars41c51212001-08-28 15:45:34 +000061 @$(MAKE) -C testcases $@