makefile fixes, moved the linking subsystem to driver-rule-reckoning
[henge/webcc.git] / Makefile
index a8aefba..d10e17b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -28,11 +28,9 @@ SLANGS      := y rl
 # Language-specific compilers and flags passed in from environment
 c_C         := $(strip $(notdir $(CC)))
 c_FLAGS     := $(strip $(CFLAGS)) -I$(SRC_DIR)
-c_LIBS      := SDL2 wolfssl unistring
 c_SRCL      := y
 cpp_C       := $(strip $(notdir $(CXX)))
 cpp_FLAGS   := $(strip $(CXXFLAGS)) $(c_FLAGS)
-cpp_LIBS    := $(c_LIBS)
 go_C        := gccgo
 go_FLAGS    := $(c_FLAGS)
 # Source to source languages
@@ -73,7 +71,7 @@ gccgo_LD    := $(cc_LD)
 gccgo_AR    := $(cc_AR)
 gccgo_AROBJ := $(cc_AROBJ)
 # Shell functions to determine what libraries can be linked by the compiler
-cc_LDLIBS   := $(shell ls /usr/lib | grep ".o" | sed -e 's@^.*lib\([_\+a-zA-Z0-9\-]*\)\..*@\1@g')
+cc_LDLIBS   := $(shell ldconfig -p | sed -e 's@\-*[0-9\.]*\.so.*$$@@g' -e 's@\tlib@@g' -e '/[\t ]/d')
 gcc_LDLIBS  := $(cc_LDLIBS)
 emcc_LDLIBS := 
 g++_LDLIBS  := $(cc_LDLIBS)
@@ -116,7 +114,6 @@ $(eval CVSROOT_BAK := $(CVSROOT)))
 ifdef LANG_INIT
 $(foreach lang,$(LANGS),\
 $(eval $(call LANG_INIT,$(lang)))\
-$(eval $(lang)_LIBS := $(shell echo $($(lang)_LIBS | $(call AWK_REVERSE_SQUASH))))\
 )
 else
 $(error No LANG_INIT available, no languages can be compiled)