1#
2# BCM shared library Makefile for Linux router
3#
4# Copyright (C) 2013, Broadcom Corporation
5# All Rights Reserved.
6# 
7# This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation;
8# the contents of this file may not be disclosed to third parties, copied
9# or duplicated in any form, in whole or in part, without the prior
10# written permission of Broadcom Corporation.
11#
12# $Id: Makefile 382668 2013-02-03 04:41:22Z $
13#
14
15include $(TOP)/.config
16
17
18CFLAGS	+= -I. -I$(SRCBASE)/include ${WLAN_StdIncPathA} -I$(SRCBASE)/common/include -I$(SRCBASE)/router/shared -Wall
19#CFLAGS	+= -g -DDEBUG
20CFLAGS	+= -s
21ifeq ($(CONFIG_RTR_OPTIMIZE_SIZE),y)
22CFLAGS  += -Os
23else
24CFLAGS  += -O2
25endif
26LDFLAGS += -L.
27
28OBJS := bcmgpio.o
29
30ifeq ($(wildcard ./*.c),)
31all:
32	cp -f ./prebuilt/libbcm.so .
33else
34all: libbcm.so
35endif
36
37install: all
38	install -d $(INSTALLDIR)/usr/lib
39	install -m 755 libbcm.so $(INSTALLDIR)/usr/lib
40	$(STRIP) $(INSTALLDIR)/usr/lib/libbcm.so
41
42clean:
43	rm -f *.o *.so
44
45libbcm.so: $(OBJS)
46	$(LD) -shared -o $@ $^
47