Add Improved Library Handling
This commit is contained in:
@@ -48,6 +48,8 @@ FILTER = Libraries%
|
||||
SOURCES := $(filter-out $(FILTER),$(SOURCES))
|
||||
OBJECTS = $(SOURCES:.cpp=.o.$(ARCH))
|
||||
DEPENDS = $(OBJECTS:.o.$(ARCH)=.d.$(ARCH))
|
||||
LIBRARIES =
|
||||
LIBFILES =
|
||||
TARGETS =
|
||||
|
||||
# ---------- Recursive Targets ----------
|
||||
@@ -75,6 +77,14 @@ define build_target_library_arch
|
||||
@mv $(1) $$(echo $(ROOTPATH)/lib/$(ARCH)/lib$(1) | sed 's/\.$(ARCH)//g')
|
||||
endef
|
||||
|
||||
define add_library
|
||||
LIBFILES += $(ROOTPATH)/Libraries/$(1)/lib/$(ARCH)/lib$(1).a
|
||||
LFLAGS += -l$(1)
|
||||
LFLAGS += -L$(ROOTPATH)/Libraries/$(1)/lib/$(ARCH)
|
||||
CFLAGS += -I$(ROOTPATH)/Libraries/$(1)/include
|
||||
endef
|
||||
|
||||
$(foreach library,$(LIBRARIES),$(eval $(call add_library,$(library))))
|
||||
|
||||
# ---------- Targets ----------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user