Access Control is now enabled for Gitlab Pages so you can now restrict Pages to authorized users only. If needed, make your website publicly available : Navigate to your project's Settings > General > Visibility and select Everyone in pages section.

Commit 0e71d465 authored by Jacques Supcik's avatar Jacques Supcik 💻

update make files

parent 8550e75d
Pipeline #11622 passed with stage
in 42 seconds
......@@ -61,7 +61,13 @@ SECTIONS
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} > DDR0
__exidx_end = .;
.shell_cmd :
{
__shell_cmd_start = .;
KEEP(*(.shell_cmd))
__shell_cmd_end = .;
} > DDR0
.data :
{
......
#Standard makefile for LMI labs
ifeq ($(OS),Windows_NT)
DEL=del /F /S /Q
MKDIR=mkdir
RMDIR=rmdir /S /Q
else
DEL=rm -Rf
MKDIR=mkdir -p
RMDIR=rm -Rf
endif
mkfile_dir := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
export mkfile_dir
include $(mkfile_dir)/bbb_tools.mk
ifneq ($(LIBDIRS),)
LIBALL=lib_all
LIBALL_CLEAN=lib_all_clean
endif
include $(LMIBASE)/bbb/make/bbb_tools.mk
.PHONY: all clean lib_all
.PHONY: all clean lib_all lib_all_clean
all: $(OBJDIR) $(EXTRA_ALL) $(LIBALL) $(EXE)
......@@ -26,16 +17,15 @@ clean: $(EXTRA_CLEAN) $(LIBALL_CLEAN)
-$(RMDIR) .obj
lib_all_clean:
@for dir in $(LIBDIRS); do $(MAKE) --no-print-directory -C $$dir clean; done
$(foreach dir,$(LIBDIRS), "$(MAKE)" --no-print-directory -C $(dir) clean $(SEP))
lib_all:
@for dir in $(LIBDIRS); do $(MAKE) --no-print-directory -C $$dir all; done
$(foreach dir,$(LIBDIRS), "$(MAKE)" --no-print-directory -C $(dir) all $(SEP))
$(EXE): $(OBJS) $(LINKER_SCRIPT) $(EXTRA_LIBS)
$(LD) $(OBJS) $(LDFLAGS) -o $@
$(OBJDIR):
echo $(OBJDIR)
$(MKDIR) $(OBJDIR)
-include $(OBJS:.o=.d)
......
ARCH=$(addsuffix .a, $(addprefix lib, $(notdir $(CURDIR))))
include $(LMIBASE)/bbb/make/bbb_tools.mk
mkfile_dir := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
export mkfile_dir
include $(mkfile_dir)/bbb_tools.mk
.PHONY: all clean
OBJS=$(addprefix $(OBJDIR)/, $(ASRC:.S=.o) $(SRCS:.c=.o))
all: $(OBJDIR)/ $(EXTRA_ALL) $(ARCH)
clean: $(EXTRA_CLEAN)
rm -Rf $(ARCH) *~ $(EXTRAS)
rm -Rf .obj
-$(DEL) $(ARCH) *~ $(EXTRAS)
-$(RMDIR) .obj
$(ARCH): $(OBJS)
$(AR) cr $@ $(OBJS)
$(OBJDIR)/:
mkdir -p $(OBJDIR)
-$(MKDIR) $(OBJDIR)
-include $(OBJS:.o=.d)
ifeq ($(OS),Windows_NT)
DIRSEP=\\
LIBGCCPATH="c:/program files (x86)/gnu tools arm embedded/7 2018-q2-update/bin/../lib/gcc/arm-none-eabi/7.3.1"
SEP=&
LIBGCCPATH="c:/program files (x86)/gnu tools arm embedded/8 2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1"
DEL=del /F /S /Q
MKDIR=mkdir
RMDIR=rmdir /S /Q
else
DIRSEP=/
SEP=;
LIBGCCPATH=$(dir $(shell $(CC) -print-libgcc-file-name))
DEL=rm -Rf
MKDIR=mkdir -p
RMDIR=rm -Rf
endif
ifeq ($(TARGET),HOST)
CC=gcc
LD=gcc
CFLAGS+=-Wall -Wextra -g -c -O0 -MD -std=gnu11
CFLAGS+=-Werror -Wall -Wextra -g -c -O0 -MD -std=gnu11
CFLAGS+=$(EXTRA_CFLAGS)
OBJDIR=.obj$(DIRSEP)host
EXE=$(EXEC)_h
......@@ -22,56 +29,45 @@ else
AR=$(TOOLCHAIN)ar
UFLAGS+=-mlittle-endian -funsigned-char -mno-unaligned-access
UFLAGS+=-mcpu=cortex-a8 -mtune=cortex-a8 -msoft-float
LFLAGS+=-I$(LMIBASE)/bbb/source
LFLAGS+=$(addprefix -I./, $(EXTRADIRS)) $(addprefix -I./, $(LIBDIRS))
CFLAGS+=-Wall -Wextra -g -c -O1 -MD -std=gnu99
CFLAGS+=-Werror -Wall -Wextra -g -c -O0 -MD -std=gnu11
CFLAGS+=$(EXTRA_CFLAGS) $(LFLAGS) $(UFLAGS)
AFLAGS+=-mcpu=cortex-a8 -g
CPPFLAGS+= -Wall -Wextra -g -c -O0 -MD $(LFLAGS) $(UFLAGS)
CPPFLAGS+=-fno-rtti
AFLAGS+=-mcpu=cortex-a8 -g
CPPFLAGS+=-Werror -Wall -Wextra -g -c -O0 -MD $(LFLAGS) $(UFLAGS)
CPPFLAGS+=-fno-rtti
#CPPFLAGS+=-fno-threadsafe-statics
CPPFLAGS+=-fno-exceptions -fnothrow-opt
CPPFLAGS+=-std=gnu++14
CPPFLAGS+=-std=gnu++14
LDFLAGS+=--start-group $(addprefix -l, $(LIBDIRS)) -lbbb -lc -lgcc -lm -lstdc++ --end-group
LDFLAGS+= $(addprefix -L./, $(LIBDIRS))
LDFLAGS+=-L$(LMIBASE)/bbb/source
LDFLAGS+=--start-group -lbbb -lc -lgcc -lm -lstdc++ --whole-archive $(addprefix -l, $(LIBDIRS)) --end-group
LDFLAGS+= $(addprefix -L./, $(LIBDIRS))
LDFLAGS+=--gc-sections --no-eh-frame-hdr
libgcc=$(shell $(CC) -print-libgcc-file-name)
libgcc-dir= $(shell dirname $(realpath "$(ligbcc)"))
LDFLAGS+=-L$(LIBGCCPATH)
LDFLAGS+=-L"$(shell $(CC) -print-sysroot)"/lib
LDFLAGS+=-L"$(shell $(CC) -print-sysroot)"/lib
ifeq ($(PROCESS),)
EXE=$(EXEC)_a
LDFLAGS+=-T $(LMIBASE)/bbb/make/bbb.lds -Map=$(EXE).map
LDFLAGS+=-T $(mkfile_dir)/bbb.lds -Map=$(EXE).map
else
EXE=$(EXEC)_p
LDFLAGS+=-T $(LMIBASE)/bbb/make/bbb_process.lds -Map $(EXE).map
LDFLAGS+=-T $(mkfile_dir)/bbb_process.lds -Map $(EXE).map
endif
OBJDIR=.obj$(DIRSEP)bbb
OBJS+=$(addprefix $(OBJDIR)/, $(ASRC:.S=.o) $(SRCS:.c=.o) $(SCPP:.cpp=.o))
ssrc = $(filter %.s, $(SRCS))
Ssrc = $(filter %.S, $(SRCS))
csrc = $(filter %.c, $(SRCS))
OBJS+=$(addprefix $(OBJDIR)/, $(ASRC:.S=.o) $(Ssrc:.S=.o) $(ssrc:.s=.o) $(csrc:.c=.o) $(SCPP:.cpp=.o))
EXTRA_LIBS+=$(foreach dir,$(LIBDIRS), $(addprefix $(dir)/, $(addsuffix .a, $(addprefix lib, $(dir)))))
endif
export CFLAGS
export AFLAGS
export CC
export AS
export AR
export OBJDIR
$(OBJDIR)/%.o: %.c
$(CC) $(CFLAGS) $< -o $@
$(OBJDIR)/%.o: %.cpp
$(CC) $< $(CPPFLAGS) -o $@
$(OBJDIR)/%.o: %.S
$(CC) $(CFLAGS) $< -o $@
$(OBJDIR)/%.o: %.s
$(CC) $(CFLAGS) $< -o $@
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