Skip to content
Snippets Groups Projects
Commit af095edc authored by Alain Carlucci's avatar Alain Carlucci
Browse files
parents eaa90866 dbd6fb0d
Branches
Tags
No related merge requests found
...@@ -8,6 +8,14 @@ KPATH := miosix ...@@ -8,6 +8,14 @@ KPATH := miosix
CONFPATH := $(KPATH) CONFPATH := $(KPATH)
include $(CONFPATH)/config/Makefile.inc include $(CONFPATH)/config/Makefile.inc
ifeq ("$(BUILD_VERBOSE)","1")
Q := @
ECHO := @echo
else
Q :=
ECHO := @true
endif
## ##
## List here subdirectories which contains makefiles ## List here subdirectories which contains makefiles
## ##
......
...@@ -2,10 +2,18 @@ ...@@ -2,10 +2,18 @@
## Makefile for Miosix embedded OS ## Makefile for Miosix embedded OS
## This makefile builds the whole kernel ## This makefile builds the whole kernel
## ##
MAKEFILE_VERSION := 1.07 MAKEFILE_VERSION := 1.08
## KPATH and CONFPATH are forwarded by the parent Makefile ## KPATH and CONFPATH are forwarded by the parent Makefile
include $(CONFPATH)/config/Makefile.inc include $(CONFPATH)/config/Makefile.inc
ifeq ("$(BUILD_VERBOSE)","1")
Q :=
ECHO := @true
else
Q := @
ECHO := @echo
endif
## List of all Miosix OS source files that have no special requirements ## List of all Miosix OS source files that have no special requirements
## and that must be built for each architecture (both .c and .cpp) ## and that must be built for each architecture (both .c and .cpp)
## These files will end up in libmiosix.a ## These files will end up in libmiosix.a
...@@ -57,6 +65,7 @@ Q := @ ...@@ -57,6 +65,7 @@ Q := @
ECHO := @echo ECHO := @echo
endif endif
BINDIR := bin/$(OPT_BOARD)
## Replaces both "foo.cpp"-->"foo.o" and "foo.c"-->"foo.o" ## Replaces both "foo.cpp"-->"foo.o" and "foo.c"-->"foo.o"
OBJ := $(addsuffix .o, $(basename $(SRC))) OBJ := $(addsuffix .o, $(basename $(SRC)))
...@@ -72,14 +81,17 @@ DFLAGS := -MMD -MP ...@@ -72,14 +81,17 @@ DFLAGS := -MMD -MP
## Build libmiosix.a and stage_1_boot.o (whose path is in BOOT_FILE) ## Build libmiosix.a and stage_1_boot.o (whose path is in BOOT_FILE)
## The file stage_1_boot.o is compiled separately because ## The file stage_1_boot.o is compiled separately because
## it must not end up in libmiosix.a ## it must not end up in libmiosix.a
all: $(OBJ) $(BOOT_FILE) all: makedir $(OBJ) $(BOOT_FILE)
$(ECHO) "[PERL] Checking global objects" $(ECHO) "[PERL] Checking global objects"
$(Q)perl _tools/kernel_global_objects.pl $(OBJ) $(Q)perl _tools/kernel_global_objects.pl $(OBJ)
$(ECHO) "[AR ] libmiosix.a" $(ECHO) "[AR ] libmiosix.a"
$(Q)$(AR) rcs libmiosix.a $(OBJ) $(Q)$(AR) rcs $(BINDIR)/libmiosix.a $(OBJ)
makedir:
$(Q) mkdir -p $(BINDIR)
clean: clean:
-rm -f $(OBJ) $(BOOT_FILE) libmiosix.a $(OBJ:.o=.d) -rm -f $(OBJ) $(BOOT_FILE) $(BINDIR)/libmiosix.a $(OBJ:.o=.d)
-rm -f $(BOOT_FILE:.o=.d) -rm -f $(BOOT_FILE:.o=.d)
%.o: %.s %.o: %.s
...@@ -96,3 +108,6 @@ clean: ...@@ -96,3 +108,6 @@ clean:
#pull in dependecy info for existing .o files #pull in dependecy info for existing .o files
-include $(OBJ:.o=.d) -include $(OBJ:.o=.d)
.PHONY: clean makedir
.NOTPARALLEL: clean makedir
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment