Add a logfile option to ltpmenu2
[ltp-debian.git] / Makefile
blob69c9fc50e866a524561d534dbb2848b427d23d7e
1 # To cross compile, override one or more of CC, AR, CROSS_CFLAGS,
2 # LOADLIBES, LDFLAGS, & LIB_DIR and be sure to always build from the top level.
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 # LDFLAGS=-static \
9 # LOADLIBES="-lpthread -lc -lresolv -lnss_dns -lnss_files -lm -lc"
11 # Alternately, to override them by editing this file, uncomment the
12 # following lines:
13 # CROSS_COMPILER=/opt/ppc64/powerpc64-linux/bin/powerpc64-linux-
14 # CROSS_CFLAGS= -mpowerpc64
15 # LDFLAGS=-static
16 # LOADLIBES=-lpthread -lc -lresolv -lnss_dns -lnss_files -lm -lc
17 # LIB_DIR=/lib64
18 # export LOADLIBES LIB_DIR
20 # Or, you can save all your settings into the local 'config.mk' file.
21 # The defaults will not be usable in that case; you will need to
22 # override things explicitly.
24 # uClinux Users: make sure you add -DUCLINUX to your CFLAGS
26 # Note: If you override a variable from the commandline all
27 # assignments to it in the Makefiles will be ignored. To set it both
28 # in the commandline and in the Makefiles use a dummy variable like in
29 # CFLAGS
31 ifdef CROSS_COMPILE
32 CROSS_COMPILER = $(CROSS_COMPILE)
33 endif
34 ifdef CROSS_COMPILER
35 CC=$(CROSS_COMPILER)gcc
36 AR=$(CROSS_COMPILER)ar
37 RANLIB=$(CROSS_COMPILER)ranlib
38 endif
40 HAS_NUMA=no
42 export CFLAGS += -Wall $(CROSS_CFLAGS)
43 export CC AR RANLIB CPPFLAGS LDFLAGS HAS_NUMA
45 -include config.mk
47 VPATH += include m4
48 all: config.h libltp.a
49 @$(MAKE) -C pan $@
50 @$(MAKE) -C testcases $@
51 @$(MAKE) -C tools $@
52 @echo
53 @echo "***********************************************"
54 @echo "** You now need to do a make install as root **"
55 @echo "***********************************************"
57 install: all
58 @$(MAKE) -C testcases install
59 @$(MAKE) -C tools install
60 @$(MAKE) -C lib install
61 @$(MAKE) -C include install
62 @$(MAKE) -C pan install
63 @$(MAKE) -C m4 install
64 @$(MAKE) -C doc/man1 install
65 @$(MAKE) -C doc/man3 install
67 @./IDcheck.sh
69 libltp.a: config.h
70 @$(MAKE) -C lib $@
72 uclinux: uclinux_libltp.a
73 #@$(MAKE) -C pan all
74 @$(MAKE) -C testcases uclinux
75 @$(MAKE) -C tools all
76 @echo
77 @echo "*******************************************************"
78 @echo "** You now need to do a make uclinux_install as root **"
79 @echo "*******************************************************"
81 uclinux_install: uclinux
82 @$(MAKE) -C testcases uclinux_install
83 @$(MAKE) -C tools install
84 @./IDcheck.sh
86 uclinux_libltp.a:
87 @$(MAKE) -C lib UCLINUX=1 libltp.a
89 menuconfig:
90 @./ltpmenu
92 clean: ac-clean
93 @$(MAKE) -C lib $@
94 @$(MAKE) -C pan $@
95 @$(MAKE) -C tools $@
96 @$(MAKE) -C testcases $@
98 distclean: clean ac-distclean
99 @$(MAKE) -C include $@
101 maintainer-clean: distclean ac-maintainer-clean
102 @$(MAKE) -C include $@
104 package:
105 rpmbuild -ba ltp-devel.spec
109 # Autotools related
111 .PHONY: autoconf
112 autoconf: configure config.h.in config.h
113 configure: configure.ac $(notdir $(wildcard m4/*.m4))
114 autoconf
116 config.h.in: configure.ac $(notdir $(wildcard m4/*.m4))
117 autoheader
119 config.h: config.h.default
120 cp include/config.h.default include/config.h
122 .PHONY: ac-clean ac-distclean ac-ac-maintainer-clean
123 ac-clean:
124 rm -rf autom4te.cache
125 rm -f config.log config.status
126 ac-distclean: ac-clean
127 ac-maintainer-clean: ac-distclean
128 rm -f configure
131 # Help
133 .PHONY: help
134 help:
135 @echo
136 @echo 'About configuration'
137 @echo '-------------------'
138 @echo 'If you want to use auto configuration, '
139 @echo 'be sure autoconf is installed. Then run: '
140 @echo ' $$ make autoconf '
141 @echo ' $$ ./configure '
142 @echo ' $$ make all '
143 @echo
144 @echo 'If you want to use default configuration, '
145 @echo 'autoconf is not needed. Just run: '
146 @echo ' $$ touch include/config.h.default '
147 @echo ' $$ make config.h '
148 @echo ' $$ make all '
149 @echo
150 @echo 'If make all is failed even if you use the '
151 @echo 'auto configuration, please, report it to '
152 @echo 'ltp developers with config.log, generated '
153 @echo 'by running the configure script. '
154 @echo