-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMakefile.openwrt
More file actions
56 lines (40 loc) · 1.18 KB
/
Makefile.openwrt
File metadata and controls
56 lines (40 loc) · 1.18 KB
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
#
# Makefile
# http://wiki.openwrt.org/doc/devel/crosscompile
HAVE_PYTHON=0
DEBUG=1
TARGET_DIR=/home/invent/alfa/15.05_buildroot/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2
TOOLCHAIN_DIR=/home/invent/alfa/15.05_buildroot/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2
# Needs to be defined as env
STAGING_DIR=$(TOOLCHAIN_DIR)
CFLAGS=-O3 -Wall -D_DEFAULT_SOURCE -I$(TOOLCHAIN_DIR)/usr/include -I$(TARGET_DIR)/usr/include -static
LDFLAGS=-L$(TOOLCHAIN_DIR)/usr/lib -L$(TARGET_DIR)/usr/lib -lpthread -lpcre -lnet -lnl-genl-3 -lnl-3 -lcrypto
CC=$(TOOLCHAIN_DIR)/bin/mips-openwrt-linux-uclibc-gcc
LD=$(TOOLCHAIN_DIR)/bin/mips-openwrt-linux-uclibc-ld
export STAGING_DIR
export TARGET_DIR
export TOOLCHAIN_DIR
export LD
export CC
OBJ = logger.o tqueue.o ap.o lrc.o matchers.o crypto.o $(OSD)/lib$(OSD).a
OSD = osdep
LIBOSD = $(OSD)/lib$(OSD).so
ifeq ($(HAVE_PYTHON),1)
CFLAGS+=-DHAVE_PYTHON
LDFLAGS+=-lpython2.7
endif
ifeq ($(DEBUG),1)
CFLAGS+=-ggdb3
endif
all: osd lrc
@echo
osd:
$(MAKE) -C $(OSD)
$(LIBOSD):
$(MAKE) -C $(OSD)
lrc: $(OBJ)
$(CC) -o $@ $(OBJ) ${LDFLAGS}
clean:
rm -f $(OBJ) lrc *~
$(MAKE) -C $(OSD) clean
distclean: clean