From cd0f6c2fa183794952178fa4a5c90485055e12bb Mon Sep 17 00:00:00 2001 From: "John Hodge (sonata)" Date: Sat, 18 Oct 2014 08:48:37 +0800 Subject: [PATCH] ARCH=native - Fix compilation on newer compilers (link order) --- Usermode/Applications/CLIShell_src/Makefile | 3 ++- Usermode/Applications/Makefile.tpl | 4 ++-- Usermode/Applications/axwin3_src/Interface/Makefile | 2 +- Usermode/Applications/axwin3_src/WM/Makefile | 2 +- Usermode/Applications/axwin3_src/WM/common.mk | 2 +- Usermode/Applications/axwin4_src/Server/Makefile | 2 +- Usermode/Applications/axwin4_src/UI/Makefile | 2 +- Usermode/Applications/gui_ate_src/Makefile | 2 +- Usermode/Applications/gui_terminal_src/Makefile | 2 +- Usermode/Applications/ip_src/Makefile | 3 ++- Usermode/Applications/irc_src/Makefile | 2 +- Usermode/Applications/ping_src/Makefile | 2 +- Usermode/Applications/telnet_src/Makefile | 2 +- Usermode/Applications/telnetd_src/Makefile | 2 +- Usermode/Applications/wget_src/Makefile | 3 ++- Usermode/Libraries/libpsocket.so_src/Makefile | 3 ++- 16 files changed, 21 insertions(+), 17 deletions(-) diff --git a/Usermode/Applications/CLIShell_src/Makefile b/Usermode/Applications/CLIShell_src/Makefile index e500edd2..76d8f573 100644 --- a/Usermode/Applications/CLIShell_src/Makefile +++ b/Usermode/Applications/CLIShell_src/Makefile @@ -3,7 +3,8 @@ -include ../Makefile.cfg CPPFLAGS += -I./include -LDFLAGS += -lreadline +LDFLAGS += +LIBS += -lreadline BIN = CLIShell OBJ = main.o lib.o diff --git a/Usermode/Applications/Makefile.tpl b/Usermode/Applications/Makefile.tpl index 6ce97c45..d1dcfcff 100644 --- a/Usermode/Applications/Makefile.tpl +++ b/Usermode/Applications/Makefile.tpl @@ -20,8 +20,8 @@ _LIBS := $(filter -l%,$(LIBS)) _LIBS := $(patsubst -l%,$(OUTPUTDIR)Libs/lib%.so,$(_LIBS)) ifeq ($(ARCHDIR),native) - LDFLAGS := -L$(OUTPUTDIR)Libs/ $(subst -lc++ ,-lc++_acess ,$(LDFLAGS)) - LIBS := $(subst -lc++ ,-lc++_acess ,$(LIBS)) + LDFLAGS := -L$(OUTPUTDIR)Libs/ $(patsubst -lc++,-lc++_acess,$(LDFLAGS)) + LIBS := $(patsubst -lc++,-lc++_acess,$(LIBS)) endif ifeq ($(VERBOSE),) V := @ diff --git a/Usermode/Applications/axwin3_src/Interface/Makefile b/Usermode/Applications/axwin3_src/Interface/Makefile index d96cc5e9..d5303649 100644 --- a/Usermode/Applications/axwin3_src/Interface/Makefile +++ b/Usermode/Applications/axwin3_src/Interface/Makefile @@ -8,7 +8,7 @@ DIR := Apps/AxWin/3.0 BIN := AxWinUI OBJ := main.o -LDFLAGS += -laxwin3 +LIBS += -laxwin3 -include ../../Makefile.tpl diff --git a/Usermode/Applications/axwin3_src/WM/Makefile b/Usermode/Applications/axwin3_src/WM/Makefile index 5854a395..595044db 100644 --- a/Usermode/Applications/axwin3_src/WM/Makefile +++ b/Usermode/Applications/axwin3_src/WM/Makefile @@ -8,7 +8,7 @@ BIN := AxWinWM OBJ := main.o input.o video.o ipc_acess.o include common.mk -LDFLAGS += -lnet +LIBS += -lnet -include ../../Makefile.tpl diff --git a/Usermode/Applications/axwin3_src/WM/common.mk b/Usermode/Applications/axwin3_src/WM/common.mk index e354e0cf..81ab3279 100644 --- a/Usermode/Applications/axwin3_src/WM/common.mk +++ b/Usermode/Applications/axwin3_src/WM/common.mk @@ -18,7 +18,7 @@ OBJ += renderers/widget/textinput.o OBJ += renderers/widget/spacer.o OBJ += renderers/widget/subwin.o -LDFLAGS += -limage_sif -luri -lunicode +LIBS += -limage_sif -luri -lunicode PNGIMAGES := toolbar_new.png toolbar_save.png toolbar_open.png IMG2SIF = ../../../../Tools/img2sif diff --git a/Usermode/Applications/axwin4_src/Server/Makefile b/Usermode/Applications/axwin4_src/Server/Makefile index cb306b8d..dfd4d0fc 100644 --- a/Usermode/Applications/axwin4_src/Server/Makefile +++ b/Usermode/Applications/axwin4_src/Server/Makefile @@ -13,7 +13,7 @@ OBJ += CRect.o CSurface.o OBJ += draw_control.o BIN := AxWinServer -LDFLAGS += -lc++ +LIBS += -lc++ CXXFLAGS += -O3 include ../../Makefile.tpl diff --git a/Usermode/Applications/axwin4_src/UI/Makefile b/Usermode/Applications/axwin4_src/UI/Makefile index 8cf7699f..f225d5f7 100644 --- a/Usermode/Applications/axwin4_src/UI/Makefile +++ b/Usermode/Applications/axwin4_src/UI/Makefile @@ -7,6 +7,6 @@ OBJ := main.o taskbar.o BIN := AxWinUI -LDFLAGS += -laxwin4 +LIBS += -laxwin4 include ../../Makefile.tpl diff --git a/Usermode/Applications/gui_ate_src/Makefile b/Usermode/Applications/gui_ate_src/Makefile index fe1b2148..25e256ef 100644 --- a/Usermode/Applications/gui_ate_src/Makefile +++ b/Usermode/Applications/gui_ate_src/Makefile @@ -2,7 +2,7 @@ -include ../Makefile.cfg -LDFLAGS += -laxwin3 +LIBS += -laxwin3 OBJ = main.o strings.o toolbar.o BIN = ate diff --git a/Usermode/Applications/gui_terminal_src/Makefile b/Usermode/Applications/gui_terminal_src/Makefile index a38f1355..be645009 100644 --- a/Usermode/Applications/gui_terminal_src/Makefile +++ b/Usermode/Applications/gui_terminal_src/Makefile @@ -2,7 +2,7 @@ -include ../Makefile.cfg -LDFLAGS += -laxwin3 -lunicode +LIBS += -laxwin3 -lunicode OBJ = main.o vt100.o display.o BIN = terminal diff --git a/Usermode/Applications/ip_src/Makefile b/Usermode/Applications/ip_src/Makefile index 1c976b50..e3ff4e9b 100644 --- a/Usermode/Applications/ip_src/Makefile +++ b/Usermode/Applications/ip_src/Makefile @@ -2,7 +2,8 @@ -include ../Makefile.cfg -LDFLAGS += -lnet +LDFLAGS += +LIBS += -lnet OBJ = main.o addr.o routes.o BIN = ip diff --git a/Usermode/Applications/irc_src/Makefile b/Usermode/Applications/irc_src/Makefile index f22e82fe..78d803e3 100644 --- a/Usermode/Applications/irc_src/Makefile +++ b/Usermode/Applications/irc_src/Makefile @@ -2,7 +2,7 @@ -include ../Makefile.cfg -LDFLAGS += -lnet -lreadline +LIBS += -lnet -lreadline OBJ = main.o server.o input.o OBJ += window.o pseudo_curses.o diff --git a/Usermode/Applications/ping_src/Makefile b/Usermode/Applications/ping_src/Makefile index 64c4649e..3893fa0f 100644 --- a/Usermode/Applications/ping_src/Makefile +++ b/Usermode/Applications/ping_src/Makefile @@ -2,7 +2,7 @@ -include ../Makefile.cfg -LDFLAGS += -lnet +LIBS += -lnet OBJ = main.o BIN = ping diff --git a/Usermode/Applications/telnet_src/Makefile b/Usermode/Applications/telnet_src/Makefile index bbcac85f..7d61245e 100644 --- a/Usermode/Applications/telnet_src/Makefile +++ b/Usermode/Applications/telnet_src/Makefile @@ -2,7 +2,7 @@ -include ../Makefile.cfg -LDFLAGS += -lnet -lreadline +LIBS += -lnet -lreadline OBJ = main.o BIN = telnet diff --git a/Usermode/Applications/telnetd_src/Makefile b/Usermode/Applications/telnetd_src/Makefile index a85a0712..d7d6ee6e 100644 --- a/Usermode/Applications/telnetd_src/Makefile +++ b/Usermode/Applications/telnetd_src/Makefile @@ -2,7 +2,7 @@ -include ../Makefile.cfg -LDFLAGS += -lnet +LIBS += -lnet OBJ = main.o BIN = telnetd diff --git a/Usermode/Applications/wget_src/Makefile b/Usermode/Applications/wget_src/Makefile index e6f5a012..db28b27f 100644 --- a/Usermode/Applications/wget_src/Makefile +++ b/Usermode/Applications/wget_src/Makefile @@ -3,7 +3,8 @@ -include ../Makefile.cfg CFLAGS += -std=gnu99 -LDFLAGS += -lnet -lpsocket -luri +LIBS += -lnet -lpsocket -luri + OBJ = main.o BIN = wget diff --git a/Usermode/Libraries/libpsocket.so_src/Makefile b/Usermode/Libraries/libpsocket.so_src/Makefile index 0ad326e5..65f7380b 100644 --- a/Usermode/Libraries/libpsocket.so_src/Makefile +++ b/Usermode/Libraries/libpsocket.so_src/Makefile @@ -4,7 +4,8 @@ include ../Makefile.cfg CPPFLAGS += CFLAGS += -Wall -LDFLAGS += -lc -soname libpsocket.so -lnet +LDFLAGS += -lc -soname libpsocket.so +LIBS += -lnet OBJ = main.o getaddrinfo.o socket.o pton.o byteordering.o BIN = libpsocket.so -- 2.20.1