From 27f54ebdbd892a781d12cd8f93bb2af7fea4824f Mon Sep 17 00:00:00 2001 From: Nicolas 'Pixel' Noble Date: Mon, 12 Jul 2021 21:18:33 -0700 Subject: [PATCH] Simplifying / fixing Makefiles. --- common.mk | 8 ++++++-- hello_2pads/Makefile | 1 - hello_cdda/Makefile | 1 - hello_cube/Makefile | 1 - hello_cubetex/Makefile | 1 - hello_gte_opti/Makefile | 1 - hello_light/Makefile | 1 - hello_multivag/Makefile | 1 - hello_pad/Makefile | 1 - hello_poly/Makefile | 1 - hello_poly_ft/Makefile | 1 - hello_poly_fun/Makefile | 1 - hello_poly_gt/Makefile | 1 - hello_poly_gt_tw/Makefile | 1 - hello_poly_inline/Makefile | 1 - hello_sio/Makefile | 1 - hello_sprt/Makefile | 1 - hello_tile/Makefile | 1 - hello_vag/Makefile | 1 - hello_world/Makefile | 1 - 20 files changed, 6 insertions(+), 21 deletions(-) diff --git a/common.mk b/common.mk index 0b9611f..5408cfe 100644 --- a/common.mk +++ b/common.mk @@ -29,10 +29,14 @@ LDFLAGS += -ltap LDFLAGS += -lcd LDFLAGS += -Wl,--end-group +THISDIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) + +include $(THISDIR)/thirdparty/nugget/common.mk + # convert TIM file to bin %.o: %.tim - $(PREFIX)-objcopy -I binary --set-section-alignment .data=4 --rename-section .data=.rodata,alloc,load,readonly,data,contents -O elf32-tradlittlemips -B mips $< $@ + $(PREFIX)-objcopy -I binary --set-section-alignment .data=4 --rename-section .data=.rodata,alloc,load,readonly,data,contents -O $(FORMAT) -B mips $< $@ # convert VAG files to bin %.o: %.vag - $(PREFIX)-objcopy -I binary --set-section-alignment .data=4 --rename-section .data=.rodata,alloc,load,readonly,data,contents -O elf32-tradlittlemips -B mips $< $@ + $(PREFIX)-objcopy -I binary --set-section-alignment .data=4 --rename-section .data=.rodata,alloc,load,readonly,data,contents -O $(FORMAT) -B mips $< $@ diff --git a/hello_2pads/Makefile b/hello_2pads/Makefile index 17d7531..a2286a8 100644 --- a/hello_2pads/Makefile +++ b/hello_2pads/Makefile @@ -3,4 +3,3 @@ TARGET = hello_2pads SRCS = hello_2pads.c \ include ../common.mk -include ../thirdparty/nugget/common.mk \ diff --git a/hello_cdda/Makefile b/hello_cdda/Makefile index a0fdfd0..0c5381a 100644 --- a/hello_cdda/Makefile +++ b/hello_cdda/Makefile @@ -3,4 +3,3 @@ TARGET = hello_cdda SRCS = hello_cdda.c \ include ../common.mk -include ../thirdparty/nugget/common.mk \ diff --git a/hello_cube/Makefile b/hello_cube/Makefile index 2df2d72..30bcd5b 100644 --- a/hello_cube/Makefile +++ b/hello_cube/Makefile @@ -3,4 +3,3 @@ TARGET = hello_cube SRCS = hello_cube.c \ include ../common.mk -include ../thirdparty/nugget/common.mk \ diff --git a/hello_cubetex/Makefile b/hello_cubetex/Makefile index fe7e465..160756d 100644 --- a/hello_cubetex/Makefile +++ b/hello_cubetex/Makefile @@ -4,4 +4,3 @@ SRCS = hello_cubetex.c \ ../TIM/cubetex.tim \ include ../common.mk -include ../thirdparty/nugget/common.mk \ diff --git a/hello_gte_opti/Makefile b/hello_gte_opti/Makefile index 37482e4..b527282 100644 --- a/hello_gte_opti/Makefile +++ b/hello_gte_opti/Makefile @@ -3,4 +3,3 @@ TARGET = hello_gte_opti SRCS = hello_gte_opti.c \ include ../common.mk -include ../thirdparty/nugget/common.mk \ diff --git a/hello_light/Makefile b/hello_light/Makefile index e67f069..ff70832 100644 --- a/hello_light/Makefile +++ b/hello_light/Makefile @@ -3,4 +3,3 @@ TARGET = hello_light SRCS = hello_light.c \ include ../common.mk -include ../thirdparty/nugget/common.mk \ diff --git a/hello_multivag/Makefile b/hello_multivag/Makefile index fcbd39c..62bc782 100644 --- a/hello_multivag/Makefile +++ b/hello_multivag/Makefile @@ -5,4 +5,3 @@ SRCS = hello_multivag.c \ ../VAG/poly.vag \ include ../common.mk -include ../thirdparty/nugget/common.mk \ diff --git a/hello_pad/Makefile b/hello_pad/Makefile index 914fd5f..f8e40e7 100644 --- a/hello_pad/Makefile +++ b/hello_pad/Makefile @@ -3,4 +3,3 @@ TARGET = hello_pad SRCS = hello_pad.c \ include ../common.mk -include ../thirdparty/nugget/common.mk \ diff --git a/hello_poly/Makefile b/hello_poly/Makefile index 345f33a..56d8c12 100644 --- a/hello_poly/Makefile +++ b/hello_poly/Makefile @@ -3,4 +3,3 @@ TARGET = hello_poly SRCS = hello_poly.c \ include ../common.mk -include ../thirdparty/nugget/common.mk \ diff --git a/hello_poly_ft/Makefile b/hello_poly_ft/Makefile index 6911fe6..1bd8403 100644 --- a/hello_poly_ft/Makefile +++ b/hello_poly_ft/Makefile @@ -4,4 +4,3 @@ SRCS = hello_poly_ft.c \ ../TIM/bousai.tim \ include ../common.mk -include ../thirdparty/nugget/common.mk \ diff --git a/hello_poly_fun/Makefile b/hello_poly_fun/Makefile index 7020565..1db48c2 100644 --- a/hello_poly_fun/Makefile +++ b/hello_poly_fun/Makefile @@ -3,4 +3,3 @@ TARGET = hello_poly_fun SRCS = hello_poly_fun.c \ include ../common.mk -include ../thirdparty/nugget/common.mk \ diff --git a/hello_poly_gt/Makefile b/hello_poly_gt/Makefile index 02358ee..7e4b68d 100644 --- a/hello_poly_gt/Makefile +++ b/hello_poly_gt/Makefile @@ -4,4 +4,3 @@ SRCS = hello_poly_gt.c \ ../TIM/bousai.tim \ include ../common.mk -include ../thirdparty/nugget/common.mk \ diff --git a/hello_poly_gt_tw/Makefile b/hello_poly_gt_tw/Makefile index 7a2816d..88b8a40 100644 --- a/hello_poly_gt_tw/Makefile +++ b/hello_poly_gt_tw/Makefile @@ -4,4 +4,3 @@ SRCS = hello_poly_gt_tw.c \ ../TIM/bousai.tim \ include ../common.mk -include ../thirdparty/nugget/common.mk \ diff --git a/hello_poly_inline/Makefile b/hello_poly_inline/Makefile index 9c93777..7127a4e 100644 --- a/hello_poly_inline/Makefile +++ b/hello_poly_inline/Makefile @@ -3,4 +3,3 @@ TARGET = hello_poly_inline SRCS = hello_poly_inline.c \ include ../common.mk -include ../thirdparty/nugget/common.mk \ diff --git a/hello_sio/Makefile b/hello_sio/Makefile index 4898699..0371432 100644 --- a/hello_sio/Makefile +++ b/hello_sio/Makefile @@ -3,4 +3,3 @@ TARGET = hello_sio SRCS = hello_sio.c \ include ../common.mk -include ../thirdparty/nugget/common.mk \ diff --git a/hello_sprt/Makefile b/hello_sprt/Makefile index bf55d60..f31b24d 100644 --- a/hello_sprt/Makefile +++ b/hello_sprt/Makefile @@ -6,4 +6,3 @@ SRCS = hello_sprt.c \ ../TIM/TIM4.tim \ include ../common.mk -include ../thirdparty/nugget/common.mk \ diff --git a/hello_tile/Makefile b/hello_tile/Makefile index fca33e5..6208ec0 100644 --- a/hello_tile/Makefile +++ b/hello_tile/Makefile @@ -3,4 +3,3 @@ TARGET = hello_tile SRCS = hello_tile.c \ include ../common.mk -include ../thirdparty/nugget/common.mk \ diff --git a/hello_vag/Makefile b/hello_vag/Makefile index 93de37d..541d526 100644 --- a/hello_vag/Makefile +++ b/hello_vag/Makefile @@ -4,4 +4,3 @@ SRCS = hello_vag.c \ ../VAG/hello_poly.vag include ../common.mk -include ../thirdparty/nugget/common.mk \ diff --git a/hello_world/Makefile b/hello_world/Makefile index b5cff11..b3714ec 100644 --- a/hello_world/Makefile +++ b/hello_world/Makefile @@ -3,4 +3,3 @@ TARGET = hello_world SRCS = hello_world.c \ include ../common.mk -include ../thirdparty/nugget/common.mk \