mirror of
https://github.com/wiiu-env/wut.git
synced 2025-01-09 06:59:24 +01:00
Makefile: Generate stub cafe libraries w/ .gnu.warning sections
This commit is contained in:
parent
6aac84dc6f
commit
b02d37836f
15
Makefile
15
Makefile
@ -88,6 +88,8 @@ export OFILES_SRC := $(DEFFILES:.def=.o) $(SFILES:.s=.o) $(CFILES:.c=.o) $(CPPFI
|
|||||||
export OFILES := $(OFILES_BIN) $(OFILES_SRC)
|
export OFILES := $(OFILES_BIN) $(OFILES_SRC)
|
||||||
export HFILES := $(addsuffix .h,$(subst .,_,$(BINFILES)))
|
export HFILES := $(addsuffix .h,$(subst .,_,$(BINFILES)))
|
||||||
|
|
||||||
|
export STUB_LIBS := $(addprefix lib/stubs/lib,$(DEFFILES:.def=.a)) lib/stubs/libnn_swkbd.a lib/stubs/libwhb.a lib/stubs/libgfd.a
|
||||||
|
|
||||||
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
|
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
|
||||||
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
|
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
|
||||||
-I.
|
-I.
|
||||||
@ -95,7 +97,7 @@ export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
|
|||||||
.PHONY: all dist-bin dist-src dist install clean
|
.PHONY: all dist-bin dist-src dist install clean
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
all: lib/libwut.a lib/libwutd.a
|
all: lib/libwut.a lib/libwutd.a $(STUB_LIBS)
|
||||||
|
|
||||||
dist-bin: all
|
dist-bin: all
|
||||||
@tar --exclude=*~ -cjf wut-$(VERSION).tar.bz2 include lib share -C libraries/libwhb include -C ../libgfd include
|
@tar --exclude=*~ -cjf wut-$(VERSION).tar.bz2 include lib share -C libraries/libwhb include -C ../libgfd include
|
||||||
@ -112,6 +114,9 @@ install: dist-bin
|
|||||||
lib:
|
lib:
|
||||||
@[ -d $@ ] || mkdir -p $@
|
@[ -d $@ ] || mkdir -p $@
|
||||||
|
|
||||||
|
lib/stubs:
|
||||||
|
@[ -d $@ ] || mkdir -p $@
|
||||||
|
|
||||||
release:
|
release:
|
||||||
@[ -d $@ ] || mkdir -p $@
|
@[ -d $@ ] || mkdir -p $@
|
||||||
|
|
||||||
@ -132,6 +137,13 @@ lib/libwutd.a : $(SOURCES) $(INCLUDES) | lib debug
|
|||||||
--no-print-directory -C debug \
|
--no-print-directory -C debug \
|
||||||
-f $(CURDIR)/Makefile
|
-f $(CURDIR)/Makefile
|
||||||
|
|
||||||
|
# temp: Deprecation stub for directly linking cafe libs (all in libwut)
|
||||||
|
lib/stubs/lib%.a: | lib/stubs release
|
||||||
|
@echo stub $(notdir $*)
|
||||||
|
@echo "static const char w[] __attribute__((section(\".gnu.warning\"))) = \"Deprecation: Linking to Cafe libraries (-l$*) is no longer needed, and will be removed in future. Please update your build.\";" > release/$*.stub.c
|
||||||
|
@$(CC) $(MACHDEP) -Wno-unused-variable -c release/$*.stub.c -o release/$*.stub.o $(ERROR_FILTER)
|
||||||
|
@$(AR) -rc $@ release/$*.stub.o
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
clean:
|
clean:
|
||||||
@echo clean ...
|
@echo clean ...
|
||||||
@ -161,4 +173,3 @@ $(OFILES_SRC) : $(HFILES)
|
|||||||
#---------------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------------
|
||||||
endif
|
endif
|
||||||
#---------------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user