1# 2# Linux router shared code Makefile 3# 4# Copyright (C) 2010, Broadcom Corporation. All Rights Reserved. 5# 6# Permission to use, copy, modify, and/or distribute this software for any 7# purpose with or without fee is hereby granted, provided that the above 8# copyright notice and this permission notice appear in all copies. 9# 10# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 13# SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 15# OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 16# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17# 18# $Id: Makefile,v 1.23 2011/01/20 03:48:50 Exp $ 19# 20 21include $(SRCBASE)/router/.config 22 23CFLAGS += -I. -I../httpd -I$(SRCBASE)/include -Wall 24ifeq ($(LINUXDIR), $(SRCBASE)/linux/linux-2.6) 25CFLAGS += -I$(LINUXDIR)/include 26CFLAGS += -DLINUX26 27endif 28#CFLAGS += -g -DDEBUG 29CFLAGS += -s 30ifeq ($(CONFIG_RTR_OPTIMIZE_SIZE),y) 31CFLAGS += -Os 32else 33CFLAGS += -O2 34endif 35LDFLAGS += -L. 36 37OBJS := nvparse.o shutils.o wl.o wl_linux.o linux_timer.o defaults.o wlif_utils.o 38 39 40ifeq ($(CONFIG_PLC),y) 41OBJS += dict.o 42endif 43 44all: libshared.so 45 46install: all 47 install -d $(INSTALLDIR)/usr/lib 48 install -m 755 libshared.so $(INSTALLDIR)/usr/lib 49 $(STRIP) $(INSTALLDIR)/usr/lib/libshared.so 50 51clean: 52 rm -f *.o *.so 53 54libshared.so: $(OBJS) 55 $(LD) -shared -o $@ $^ 56