mirror of
https://github.com/wangyu-/udp2raw.git
synced 2025-01-19 14:29:34 +08:00
improve makefile
This commit is contained in:
parent
32166d65ae
commit
7ac0d3561d
28
makefile
28
makefile
@ -4,32 +4,34 @@ cc_ar71xx=/home/wangyu/OpenWrt-SDK-ar71xx-for-linux-x86_64-gcc-4.8-linaro_uClibc
|
|||||||
cc_bcm2708=/home/wangyu/raspberry/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++
|
cc_bcm2708=/home/wangyu/raspberry/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++
|
||||||
FLAGS= -std=c++11 -Wall -Wextra -Wno-unused-variable -Wno-unused-parameter
|
FLAGS= -std=c++11 -Wall -Wextra -Wno-unused-variable -Wno-unused-parameter
|
||||||
SOURCES=main.cpp lib/aes.c lib/md5.c encrypt.cpp log.cpp network.cpp common.cpp
|
SOURCES=main.cpp lib/aes.c lib/md5.c encrypt.cpp log.cpp network.cpp common.cpp
|
||||||
TAR=udp2raw_binaries.tar.gz udp2raw_amd64 udp2raw_x86 udp2raw_ar71xx udp2raw_bcm2708
|
NAME=udp2raw
|
||||||
|
TAR=${NAME}_binaries.tar.gz ${NAME}_amd64 ${NAME}_x86 ${NAME}_ar71xx ${NAME}_bcm2708
|
||||||
|
|
||||||
all:
|
all:
|
||||||
rm -f udp2raw
|
rm -f ${NAME}
|
||||||
${cc_local} -o udp2raw -I. ${SOURCES} ${FLAGS} -lrt -static -O3
|
${cc_local} -o ${NAME} -I. ${SOURCES} ${FLAGS} -lrt -static -O3
|
||||||
fast:
|
fast:
|
||||||
rm -f udp2raw
|
rm -f ${NAME}
|
||||||
${cc_local} -o udp2raw -I. ${SOURCES} ${FLAGS} -lrt
|
${cc_local} -o ${NAME} -I. ${SOURCES} ${FLAGS} -lrt
|
||||||
debug:
|
debug:
|
||||||
rm -f udp2raw
|
rm -f ${NAME}
|
||||||
${cc_local} -o udp2raw -I. ${SOURCES} ${FLAGS} -lrt -Wformat-nonliteral -D MY_DEBUG
|
${cc_local} -o ${NAME} -I. ${SOURCES} ${FLAGS} -lrt -Wformat-nonliteral -D MY_DEBUG
|
||||||
|
|
||||||
ar71xx:
|
ar71xx:
|
||||||
${cc_ar71xx} -o udp2raw_ar71xx -I. ${SOURCES} ${FLAGS} -lrt -lgcc_eh -static -O3
|
${cc_ar71xx} -o ${NAME}_ar71xx -I. ${SOURCES} ${FLAGS} -lrt -lgcc_eh -static -O3
|
||||||
bcm2708:
|
bcm2708:
|
||||||
${cc_bcm2708} -o udp2raw_bcm2708 -I. ${SOURCES} ${FLAGS} -lrt -static -O3
|
${cc_bcm2708} -o ${NAME}_bcm2708 -I. ${SOURCES} ${FLAGS} -lrt -static -O3
|
||||||
amd64:
|
amd64:
|
||||||
${cc_local} -o udp2raw_amd64 -I. ${SOURCES} ${FLAGS} -lrt -static -O3
|
${cc_local} -o ${NAME}_amd64 -I. ${SOURCES} ${FLAGS} -lrt -static -O3
|
||||||
x86:
|
x86:
|
||||||
${cc_local} -o udp2raw_x86 -I. ${SOURCES} ${FLAGS} -lrt -m32 -static -O3
|
${cc_local} -o ${NAME}_x86 -I. ${SOURCES} ${FLAGS} -lrt -m32 -static -O3
|
||||||
|
|
||||||
cross:
|
cross:
|
||||||
${cc_cross} -o udp2raw_cross -I. ${SOURCES} ${FLAGS} -lrt -static -lgcc_eh -O3
|
${cc_cross} -o ${NAME}_cross -I. ${SOURCES} ${FLAGS} -lrt -O3
|
||||||
|
|
||||||
cross2:
|
cross2:
|
||||||
${cc_cross} -o udp2raw_cross -I. ${SOURCES} ${FLAGS} -lrt -O3
|
${cc_cross} -o ${NAME}_cross -I. ${SOURCES} ${FLAGS} -lrt -static -lgcc_eh -O3
|
||||||
|
|
||||||
|
|
||||||
release: amd64 x86 ar71xx bcm2708
|
release: amd64 x86 ar71xx bcm2708
|
||||||
tar -zcvf ${TAR}
|
tar -zcvf ${TAR}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user