mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-11-19 06:56:16 +02:00
8d59f8a206
The API is fairly inflexible and is very likely to change.
42 lines
927 B
Makefile
42 lines
927 B
Makefile
#
|
|
# libubb/Makefile - Build the UBB library
|
|
#
|
|
# Written 2012-2013 by Werner Almesberger
|
|
# Copyright 2012-2013 Werner Almesberger
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
|
|
|
|
TARGET = mipsel-openwrt-linux-
|
|
CC = $(TARGET)gcc
|
|
LD = $(TARGET)ld
|
|
|
|
CFLAGS = -g -Wall -fPIC -Iinclude
|
|
LIB = libubb.a
|
|
SHLIB = libubb.so
|
|
|
|
OBJS = ubb.o swuart.o mmcclk.o physmem.o
|
|
HDRS = ubb/ubb.h ubb/regbase.h ubb/regs4740.h ubb/swuart.h ubb/mmcclk.h \
|
|
ubb/physmem.h
|
|
|
|
.PHONY: all clean spotless
|
|
|
|
all: $(SHLIB)
|
|
|
|
$(SHLIB): $(LIB)
|
|
$(LD) -shared -soname $@ -o $@ \
|
|
--whole-archive $^ || { rm -f $@; exit 1; }
|
|
|
|
$(LIB): $(OBJS)
|
|
$(AR) cr $@ $^ || { rm -f $@; exit 1; }
|
|
|
|
clean:
|
|
rm -f $(OBJS)
|
|
|
|
spotless: clean
|
|
rm -f $(LIB) $(SHLIB)
|