ports

morpheus ports
git clone git://git.2f30.org/ports
Log | Files | Refs | LICENSE

btpd.mk (1431B)


      1 <../v.mk
      2 
      3 BIN = \
      4 	btpd/btpd \
      5 	cli/btinfo \
      6 	cli/btcli
      7 LIB = libmisc.a libevloop.a
      8 
      9 libmisc_a_OBJ = `{ ls misc/*.c | sed 's/.$/o/'}
     10 libmisc_a_CFLAGS = -I`{ echo $(pwd)/misc }
     11 libmisc_a_LDFLAGS = -L`{ echo $(pwd)/misc } -lmisc -L${libressl_libdir} -lssl -lcrypto
     12 
     13 libevloop_a_OBJ = evloop/timer.o evloop/timeheap.o evloop/epoll.o
     14 libevloop_a_CFLAGS = -I`{ echo $(pwd)/evloop }
     15 libevloop_a_LDFLAGS = -L`{ echo $(pwd)/evloop } -levloop
     16 
     17 btpd_btpd_OBJ = `{ ls btpd/*.c | sed 's/.$/o/'}
     18 btpd_btpd_CFLAGS = -I./btpd $libmisc_a_CFLAGS $libevloop_a_CFLAGS
     19 btpd_btpd_LDFLAGS = -L. $libmisc_a_LDFLAGS $libevloop_a_LDFLAGS
     20 
     21 cli_btinfo_OBJ = cli/btinfo.o
     22 cli_btinfo_CFLAGS = -I./cli $libmisc_a_CFLAGS
     23 cli_btinfo_LDFLAGS = -L. $libmisc_a_LDFLAGS
     24 
     25 cli_btcli_OBJ = `{ls cli/*.c | sed 's/.$/o/' | grep -v 'btinfo'}
     26 cli_btcli_CFLAGS = -I./cli $libmisc_a_CFLAGS
     27 cli_btcli_LDFLAGS = -L. $libmisc_a_LDFLAGS
     28 
     29 INSTALL_BIN = \
     30 	btpd/btpd \
     31 	cli/btinfo \
     32 	cli/btcli
     33 INSTALL_MAN1 = `{ ls doc/*.1 }
     34 
     35 # EVLOOP_METHOD = [ EVLOOP_EPOLL, EVLOOP_KQUEUE, EVLOOP_POLL]
     36 LOCAL_CFLAGS = \
     37 	-DPACKAGE_NAME=\"btpd\" \
     38 	-DPACKAGE_VERSION=\"$v\" \
     39 	-D_FILE_OFFSET_BITS=64 -DEVLOOP_EPOLL \
     40 	-DHAVE_CLOCK_MONOTONIC \
     41 	-std=c99 -I. -I./cli -I./btpd ${libmisc_a_CFLAGS} ${libevloop_a_CFLAGS} \
     42 	-I${libressl_includedir}
     43 LOCAL_LDFLAGS = -L. -lm -lrt -L${libressl_libdir} -lssl -lcrypto
     44 
     45 DEPS = libressl
     46 
     47 <$mkbuild/mk.default
     48 
     49 btpd_btpd: $LIB
     50 cli_btcli: $LIB
     51 cli_btinfo: $LIB