Makefile 849 Bytes
Newer Older
1 2 3 4 5
# Set your cross compile prefix with CROSS_COMPILE variable
CROSS_COMPILE ?=

CMDSEP = ;

6 7 8 9 10 11 12
CC ?=		$(CROSS_COMPILE)gcc
AR ?=		$(CROSS_COMPILE)ar
LD ?=		$(CROSS_COMPILE)ld
OBJDUMP ?=	$(CROSS_COMPILE)objdump
OBJCOPY ?=	$(CROSS_COMPILE)objcopy
SIZE ?=		$(CROSS_COMPILE)size
MAKE ?=		make
13

14 15
PREFIX ?= /usr/local
CFG_DIR ?= ${PREFIX}/etc/bpm_sw
16

17 18 19 20 21 22 23
# Config file must have the following name
CFG_FILENAME = bpm_sw.cfg
# This could be set to a different config folder
CFG ?= crude_defconfig

# Get crude defconfig .cfg file
CFG_FILES = $(CFG)/$(CFG_FILENAME)
24 25 26 27 28 29 30

.PHONY: all clean mrproper install uninstall

# Makefile rules
all:

install:
31
	@mkdir -m 755 -p $(CFG_DIR)
32 33 34 35
	$(foreach cfg,$(CFG_FILES),install -m 755 $(cfg) $(CFG_DIR)/ $(CMDSEP))

uninstall:
	$(foreach cfg,$(CFG_FILES),rm -f $(CFG_DIR)/$(cfg) $(CMDSEP))
36
	@rm -rf $(CFG_DIR)
37 38 39

clean:

40
mrproper: clean
41