Makefile 3.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
#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/home/luowei/workroot/libsrc/bsl/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/ullib \
  -I../lib2-64/ullib/include \
  -I../lib2-64/ullib/output \
  -I../lib2-64/ullib/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

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


#COMAKE UUID
COMAKE_MD5=22995f423ceeb5f605432ae4280e1ed3  COMAKE


.PHONY:all
all:comake2_makefile_check ex_test_bsl_hash_multimap 
	@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 ex_test_bsl_hash_multimap
	rm -rf ./output/bin/ex_test_bsl_hash_multimap
	rm -rf ex_test_bsl_hash_multimap_test_bsl_hash_multimap.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"

ex_test_bsl_hash_multimap:ex_test_bsl_hash_multimap_test_bsl_hash_multimap.o \
  /home/luowei/workroot/libsrc/bsl/output/lib/libbsl.a
	@echo "[COMAKE:BUILD][Target:'ex_test_bsl_hash_multimap']"
	$(CXX) ex_test_bsl_hash_multimap_test_bsl_hash_multimap.o -Xlinker "-(" /home/luowei/workroot/libsrc/bsl/output/lib/libbsl.a ../com/btest/gtest/output/lib/libgtest.a \
  ../com/btest/gtest/output/lib/libgtest_main.a \
  ../lib2-64/ullib/lib/libullib.a \
  ../quality/autotest/reportlib/cpp/libautotest.a -lpthread \
  -lrt -Xlinker "-)" -o ex_test_bsl_hash_multimap
	mkdir -p ./output/bin
	cp -f --link ex_test_bsl_hash_multimap ./output/bin

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

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