Makefile 4.2 KB
Newer Older
W
wangguibao 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
#COMAKE2 edit-mode: -*- Makefile -*-
####################64Bit Mode####################
ifeq ($(shell uname -m),x86_64)
CC=gcc
CXX=g++
CXXFLAGS=-g \
  -pipe \
  -W \
  -Wall \
  -fPIC
CFLAGS=-g \
  -pipe \
  -W \
  -Wall \
  -fPIC
CPPFLAGS=-D_GNU_SOURCE \
  -D__STDC_LIMIT_MACROS \
  -DVERSION=\"1.9.8.7\"
INCPATH=-I. \
  -I../../ \
  -I./include \
  -I./output \
  -I./output/include
DEP_INCPATH=-I../../../../com/btest/gtest \
  -I../../../../com/btest/gtest/include \
  -I../../../../com/btest/gtest/output \
  -I../../../../com/btest/gtest/output/include \
  -I../../../../lib2-64/bsl \
  -I../../../../lib2-64/bsl/include \
  -I../../../../lib2-64/bsl/output \
  -I../../../../lib2-64/bsl/output/include \
  -I../../../../lib2-64/ullib \
  -I../../../../lib2-64/ullib/include \
  -I../../../../lib2-64/ullib/output \
  -I../../../../lib2-64/ullib/output/include \
  -I../../../../public/spreg \
  -I../../../../public/spreg/include \
  -I../../../../public/spreg/output \
  -I../../../../public/spreg/output/include \
  -I../../../../quality/autotest/reportlib/cpp \
  -I../../../../quality/autotest/reportlib/cpp/include \
  -I../../../../quality/autotest/reportlib/cpp/output \
  -I../../../../quality/autotest/reportlib/cpp/output/include \
  -I../../../../third-64/pcre \
  -I../../../../third-64/pcre/include \
  -I../../../../third-64/pcre/output \
  -I../../../../third-64/pcre/output/include

#============ CCP vars ============
CCHECK=@ccheck.py
CCHECK_FLAGS=
PCLINT=@pclint
PCLINT_FLAGS=
CCP=@ccp.py
CCP_FLAGS=


#COMAKE UUID
COMAKE_MD5=efc277696b93624647d9d0370f10bdd4  COMAKE


.PHONY:all
all:comake2_makefile_check test_Configure 
	@echo "[COMAKE:BUILD][Target:'all']"
	@echo "make all done"

.PHONY:comake2_makefile_check
comake2_makefile_check:
	@echo "[COMAKE:BUILD][Target:'comake2_makefile_check']"
	#in case of error, update 'Makefile' by 'comake2'
	@echo "$(COMAKE_MD5)">comake2.md5
	@md5sum -c --status comake2.md5
	@rm -f comake2.md5

.PHONY:ccpclean
ccpclean:
	@echo "[COMAKE:BUILD][Target:'ccpclean']"
	@echo "make ccpclean done"

.PHONY:clean
clean:ccpclean
	@echo "[COMAKE:BUILD][Target:'clean']"
	rm -rf test_Configure
	rm -rf ./output/bin/test_Configure
	rm -rf test_Configure_test_Configure.o

.PHONY:dist
dist:
	@echo "[COMAKE:BUILD][Target:'dist']"
	tar czvf output.tar.gz output
	@echo "make dist done"

.PHONY:distclean
distclean:clean
	@echo "[COMAKE:BUILD][Target:'distclean']"
	rm -f output.tar.gz
	@echo "make distclean done"

.PHONY:love
love:
	@echo "[COMAKE:BUILD][Target:'love']"
	@echo "make love done"

test_Configure:test_Configure_test_Configure.o \
  ../../libconfig.a
	@echo "[COMAKE:BUILD][Target:'test_Configure']"
	$(CXX) test_Configure_test_Configure.o -Xlinker "-(" ../../libconfig.a ../../../../com/btest/gtest/output/lib/libgtest.a \
  ../../../../com/btest/gtest/output/lib/libgtest_main.a \
  ../../../../lib2-64/bsl/lib/libbsl.a \
  ../../../../lib2-64/bsl/lib/libbsl_ResourcePool.a \
  ../../../../lib2-64/bsl/lib/libbsl_archive.a \
  ../../../../lib2-64/bsl/lib/libbsl_buffer.a \
  ../../../../lib2-64/bsl/lib/libbsl_check_cast.a \
  ../../../../lib2-64/bsl/lib/libbsl_exception.a \
  ../../../../lib2-64/bsl/lib/libbsl_pool.a \
  ../../../../lib2-64/bsl/lib/libbsl_utils.a \
  ../../../../lib2-64/bsl/lib/libbsl_var.a \
  ../../../../lib2-64/bsl/lib/libbsl_var_implement.a \
  ../../../../lib2-64/bsl/lib/libbsl_var_utils.a \
  ../../../../lib2-64/ullib/lib/libullib.a \
  ../../../../public/spreg/libspreg.a \
  ../../../../quality/autotest/reportlib/cpp/libautotest.a \
  ../../../../third-64/pcre/lib/libpcre.a \
  ../../../../third-64/pcre/lib/libpcrecpp.a \
  ../../../../third-64/pcre/lib/libpcreposix.a -lpthread \
  -lcrypto \
  -lrt -Xlinker "-)" -o test_Configure
	mkdir -p ./output/bin
	cp -f --link test_Configure ./output/bin

test_Configure_test_Configure.o:test_Configure.cpp
	@echo "[COMAKE:BUILD][Target:'test_Configure_test_Configure.o']"
	$(CXX) -c $(INCPATH) $(DEP_INCPATH) $(CPPFLAGS) $(CXXFLAGS)  -o test_Configure_test_Configure.o test_Configure.cpp

endif #ifeq ($(shell uname -m),x86_64)