-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyocto_Makefile
43 lines (32 loc) · 1.23 KB
/
yocto_Makefile
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
# SPDX-License-Identifier: BSD-2-Clause-Patent
# Copyright (c) 2016-2019 Intel Corporation
# This code is subject to the terms of the BSD+Patent license.
# See LICENSE file for more details.
#
# wav-dpal source Makefile
PKG_NAME := libdwpal
MAJOR := 0
MINOR := 1
VERSION := $(MAJOR).$(MINOR)
opt_no_flags := -Werror -Wcast-qual
LOG_CFLAGS := -DPACKAGE_ID=\"DWPALWLAN\" -DLOGGING_ID="dwpal" -DLOG_LEVEL=7 -DLOG_TYPE=1
EXTRALDFLAGS := -L./ -ldwpal -lcurses -lreadline -lrt -lpthread
EXTRACFLAGS := -I./include -DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_UNIX -DYOCTO
LIB_OBJS := dwpal.o dwpal_ext.o wpa_ctrl.o os_unix.o
DWPAL_CLI_OBJS := stats.o dwpal_cli.o
%.o: %.c
$(CC) $(INCLUDES) $(CFLAGS) $(EXTRACFLAGS) $(LOG_CFLAGS) $(DEFS) $(CPPFLAGS) -fPIC -MT $@ -MD -MP -MF [email protected] -c -o $@ $<
$(PKG_NAME).so.$(VERSION): $(LIB_OBJS)
$(CC) -shared -fPIC -Wl,-soname,$@ $(LIB_OBJS) $(LDFLAGS) -lnl-genl-3 -o $@
$(PKG_NAME).so: $(PKG_NAME).so.$(VERSION)
ln -sf $< $@
dwpal_cli: $(DWPAL_CLI_OBJS) $(PKG_NAME).so.$(VERSION) $(PKG_NAME).so
$(CC) -o $@ $? $(EXTRALDFLAGS) $(LDFLAGS)
.PHONY: all
all: $(PKG_NAME).so.$(VERSION) dwpal_cli $(PKG_NAME).so
.PHONY: clean
clean:
@rm -f $(LIB_OBJS)
@rm -f lib$(NAME).so*
@rm -f dwpal_cli.o dwpal_cli stats.o
@rm -f *.o.d