Commit 10d3cd7b authored by Pat Riehecky's avatar Pat Riehecky Committed by Alessandro Rubini

Added 'make install' for firmware and tools

parent f569932b
...@@ -13,7 +13,7 @@ FMC_BUS ?= fmc-bus ...@@ -13,7 +13,7 @@ FMC_BUS ?= fmc-bus
FMC_BUS_ABS ?= $(abspath $(FMC_BUS) ) FMC_BUS_ABS ?= $(abspath $(FMC_BUS) )
export FMC_BUS_ABS export FMC_BUS_ABS
DIRS = $(FMC_BUS_ABS) kernel tools DIRS = $(FMC_BUS_ABS) binaries kernel tools
.PHONY: all clean modules install modules_install $(DIRS) .PHONY: all clean modules install modules_install $(DIRS)
......
# If it exists includes Makefile.specific. In this Makefile, you should put
# specific Makefile code that you want to run before this. For example,
# build a particular environment.
-include Makefile.specific
# include parent_common.mk for buildsystem's defines
REPO_PARENT=../..
-include $(REPO_PARENT)/parent_common.mk
INSTALL = install
DESTDIR =
PREFIX = /lib/
FIRMDIR = $(PREFIX)/firmware/spec-sw
FIRMWARE = fmc-dio-eeprom.bin
all: $(FIRMWARE)
$(FIRMWARE):
ls
install:
$(INSTALL) -d $(DESTDIR)$(FIRMDIR)
$(INSTALL) -m 0644 -t $(DESTDIR)$(FIRMDIR) $(FIRMWARE)
# add the other unused targets, so the rule in ../Makefile works
modules modules_install clean:
...@@ -11,6 +11,13 @@ GIT_VERSION ?= $(shell git describe --dirty --long --tags) ...@@ -11,6 +11,13 @@ GIT_VERSION ?= $(shell git describe --dirty --long --tags)
CFLAGS += -ggdb -Wall -fPIC -I../kernel $(EXTRACFLAGS) CFLAGS += -ggdb -Wall -fPIC -I../kernel $(EXTRACFLAGS)
CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
INSTALL = install
DESTDIR =
PREFIX = /usr/local
BINDIR = $(PREFIX)/sbin
LIBDIR = $(PREFIX)/lib
LIB = libspec.a LIB = libspec.a
LIBOBJ = speclib.o loader-ll.o LIBOBJ = speclib.o loader-ll.o
...@@ -33,9 +40,16 @@ loader-ll.o: ../kernel/loader-ll.c ...@@ -33,9 +40,16 @@ loader-ll.o: ../kernel/loader-ll.c
$(LIBSHARED): $(LIB) $(LIBSHARED): $(LIB)
$(CC) -shared -o $@ -Wl,--whole-archive $^ -Wl,--no-whole-archive $(CC) -shared -o $@ -Wl,--whole-archive $^ -Wl,--no-whole-archive
install:
$(INSTALL) -d $(DESTDIR)$(BINDIR)
$(INSTALL) -m 0755 -t $(DESTDIR)$(BINDIR) $(PROGS)
$(INSTALL) -d $(DESTDIR)$(LIBDIR)
$(INSTALL) -m 0755 -t $(DESTDIR)$(LIBDIR) $(LIB)
$(INSTALL) -m 0755 -t $(DESTDIR)$(LIBDIR) $(LIBOBJ)
$(INSTALL) -m 0755 -t $(DESTDIR)$(LIBDIR) $(LIBSHARED)
clean: clean:
rm -f *.o $(LIB) $(PROGS) $(LIBSHARED) *~ rm -f *.o $(LIB) $(PROGS) $(LIBSHARED) *~
# add the other unused targets, so the rule in ../Makefile works # add the other unused targets, so the rule in ../Makefile works
modules install modules_install: modules modules_install:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment