Makefile (2168B)
1 #! gmake 2 # 3 # This Source Code Form is subject to the terms of the Mozilla Public 4 # License, v. 2.0. If a copy of the MPL was not distributed with this 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 6 7 ####################################################################### 8 # (1) Include initial platform-independent assignments (MANDATORY). # 9 ####################################################################### 10 11 include manifest.mn 12 13 ####################################################################### 14 # (2) Include "global" configuration information. (OPTIONAL) # 15 ####################################################################### 16 17 include $(CORE_DEPTH)/coreconf/config.mk 18 19 ####################################################################### 20 # (3) Include "component" configuration information. (OPTIONAL) # 21 ####################################################################### 22 23 24 ####################################################################### 25 # (4) Include "local" platform-dependent assignments (OPTIONAL). # 26 ####################################################################### 27 28 EXTRA_LIBS = $(LIBRARY) 29 30 ifneq ($(OS_ARCH),WINNT) 31 DEFINES += -DHAVE_UNISTD_H 32 endif 33 DEFINES += -DHAVE_STDARG_H 34 35 ####################################################################### 36 # (5) Execute "global" rules. (OPTIONAL) # 37 ####################################################################### 38 39 include $(CORE_DEPTH)/coreconf/rules.mk 40 41 ####################################################################### 42 # (6) Execute "component" rules. (OPTIONAL) # 43 ####################################################################### 44 45 46 47 ####################################################################### 48 # (7) Execute "local" rules. (OPTIONAL). # 49 ####################################################################### 50 51 52 test: $(PROGRAMS) 53 @cd $(OBJDIR); \ 54 if echo hello world | ./minigzip | ./minigzip -d && ./example; then \ 55 echo ' *** zlib test OK ***'; \ 56 else \ 57 echo ' *** zlib test FAILED ***'; false; \ 58 fi 59 -@rm -f foo.gz