summaryrefslogtreecommitdiffstats
path: root/target/linux/package/bcm43xx-dscape/fwcutter/Makefile
blob: 6402dca85f0cce6df06f7e3dbb90a2b41a7305cc (plain)
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
VERSION = 0.0.1

FIRMWARE_INSTALL_DIR ?= /lib/firmware

CC = cc
PREFIX = /usr/local
CFLAGS = -std=c99 -O2 -fomit-frame-pointer -Wall -pedantic -D_BSD_SOURCE
LDFLAGS =


OBJECTS = fwcutter.o md5.o

CFLAGS += -DFWCUTTER_VERSION_=$(VERSION)

all: fwcutter

fwcutter: $(OBJECTS)
	$(CC) $(CFLAGS) -o fwcutter $(OBJECTS) $(LDFLAGS)

install: all
	-install -o 0 -g 0 -m 755 fwcutter $(PREFIX)/bin/

clean:
	-rm -f *~ *.o *.orig *.rej *.fw fwcutter

installfw:
	-if ! [ -d $(FIRMWARE_INSTALL_DIR) ]; then mkdir $(FIRMWARE_INSTALL_DIR); fi
	-install -o 0 -g 0 -m 600 bcm43xx_*.fw $(FIRMWARE_INSTALL_DIR)

# dependencies
fwcutter.o: md5.h fwcutter_list.h
md5.o: md5.h