Makefile if else 判断平台
[cpp]#ARCH
ARCH="`uname -s`"
LINUX="Linux"
HP-UX="HP-UX"
#Main build target
all:build
build:
@if [ $(ARCH) = $(LINUX) ]; \
then \
echo $(ARCH); \
elif [ $(ARCH) = $(HP-UX) ]; \
then \
echo $(ARCH); \
else \
echo "ARCH unknow"; \
fi
补充:移动开发 , Android ,