Root/libubb/Makefile

1#
2# libubb/Makefile - Build the UBB library
3#
4# Written 2012-2013 by Werner Almesberger
5# Copyright 2012-2013 Werner Almesberger
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2 of the License, or
10# (at your option) any later version.
11#
12
13
14TARGET = mipsel-openwrt-linux-
15CC = $(TARGET)gcc
16LD = $(TARGET)ld
17
18CFLAGS = -g -Wall -fPIC -march=mips32 -Iinclude
19LIB = libubb.a
20SHLIB = libubb.so
21
22OBJS = ubb.o swuart.o mmcclk.o physmem.o
23HDRS = ubb/ubb.h ubb/regbase.h ubb/regs4740.h ubb/swuart.h ubb/mmcclk.h \
24       ubb/physmem.h
25
26.PHONY: all clean spotless
27
28all: $(SHLIB)
29
30$(SHLIB): $(LIB)
31        $(LD) -shared -soname $@ -o $@ \
32            --whole-archive $^ || { rm -f $@; exit 1; }
33
34$(LIB): $(OBJS)
35        $(AR) cr $@ $^ || { rm -f $@; exit 1; }
36
37clean:
38        rm -f $(OBJS)
39
40spotless: clean
41        rm -f $(LIB) $(SHLIB)
42

Archive Download this file

Branches:
master



interactive