Index: microwin/src/Makefile.rules =================================================================== --- microwin.orig/src/Makefile.rules +++ microwin/src/Makefile.rules @@ -52,15 +52,15 @@ ifneq ($(ARCH),CYGWIN) # *after* the object files that use it, but this inserts # it at the start. For Cygwin, we will add libX11.a to the # library list instead. -LDFLAGS += -L/usr/X11R6/lib -lX11 +LDFLAGS += -L$(LIBX11) -lX11 else -MW_CORE_LIBS += /usr/X11R6/lib/libX11.a +MW_CORE_LIBS += $(LIBX11)/libX11.a endif ifeq ($(ARCH),FREEBSD-X86) -INCLUDEDIRS += -I/usr/X11R6/include +INCLUDEDIRS += -I$(INCX11) endif ifeq ($(ARCH),CYGWIN) -INCLUDEDIRS += -I/usr/X11R6/include +INCLUDEDIRS += -I$(INCX11) endif endif @@ -571,7 +571,7 @@ endif ifeq ($(SHAREDLIBS), Y) $(MW_DIR_LIB)/$(LIBNAMESO): $(MW_DIR_LIB)/$(LIBNAME) @echo "Creating shared library $(patsubst $(MW_DIR_LIB)/%,%,$@) ..." - $(CC) -shared -o $@ -Wl,--whole-archive $^ -Wl,--no-whole-archive + $(CC) -shared -o $@ -Wl,-soname,$(LIBNAMESO) -Wl,--whole-archive $^ -Wl,--no-whole-archive endif # Index: microwin/src/config =================================================================== --- microwin.orig/src/config +++ microwin/src/config @@ -274,6 +274,8 @@ SCREEN_WIDTH = 640 SCREEN_HEIGHT = 480 SCREEN_DEPTH = 4 +INCX11 = /usr/X11R6/include/ +LIBX11 = /usr/X11R6/lib/ # You may want to turn this on for XFree86 4.x or if your backing store # isn't functioning properly USE_EXPOSURE = Y Index: microwin/src/Arch.rules =================================================================== --- microwin.orig/src/Arch.rules +++ microwin/src/Arch.rules @@ -21,7 +21,7 @@ else COMPILER = gcc endif CXX_COMPILER = g++ -TOOLSPREFIX = $(NATIVETOOLSPREFIX) +TOOLSPREFIX ?= $(NATIVETOOLSPREFIX) DEFINES += -DLINUX=1 -DUNIX=1 CFLAGS += $(GCC_WARNINGS) $(OPTFLAGS) LDFLAGS += @@ -32,7 +32,7 @@ endif ifeq ($(ARCH), LINUX-TCC) COMPILER = tcc CXX_COMPILER = tcc -TOOLSPREFIX = +TOOLSPREFIX ?= DEFINES += -DLINUX=1 -DUNIX=1 CFLAGS += -Dlinux=1 #CFLAGS += -Wall $(OPTFLAGS) @@ -44,7 +44,7 @@ endif ifeq ($(ARCH), LINUX-ARM) COMPILER = gcc CXX_COMPILER = g++ -TOOLSPREFIX = $(ARMTOOLSPREFIX) +TOOLSPREFIX ?= $(ARMTOOLSPREFIX) DEFINES += -DLINUX=1 -DUNIX=1 -DARCH_NEED_ALIGN32 CFLAGS += $(GCC_WARNINGS) $(OPTFLAGS) -mstructure-size-boundary=8 LDFLAGS += @@ -53,7 +53,7 @@ endif ifeq ($(ARCH), UCLINUX-ARM) COMPILER = gcc CXX_COMPILER = g++ -TOOLSPREFIX = $(ARMTOOLSPREFIX) +TOOLSPREFIX ?= $(ARMTOOLSPREFIX) DEFINES += -DLINUX=1 -DUNIX=1 -DARM_LINUX -D__uClinux__ CFLAGS += $(GCC_WARNINGS) $(OPTFLAGS) -mstructure-size-boundary=8 LDFLAGS += -elf2flt @@ -63,7 +63,7 @@ endif ifeq ($(ARCH), LINUX-MIPS) COMPILER = gcc CXX_COMPILER = g++ -TOOLSPREFIX = $(MIPSTOOLSPREFIX) +TOOLSPREFIX ?= $(MIPSTOOLSPREFIX) DEFINES += -DLINUX=1 -DUNIX=1 CFLAGS += -msoft-float $(GCC_WARNINGS) $(OPTFLAGS) ifneq ($(DEBUG), Y) @@ -75,7 +75,7 @@ endif ifeq ($(ARCH), LINUX-POWERPC) COMPILER = gcc CXX_COMPILER = g++ -TOOLSPREFIX = $(POWERPCTOOLSPREFIX) +TOOLSPREFIX ?= $(POWERPCTOOLSPREFIX) DEFINES += -DLINUX=1 -DUNIX=1 CFLAGS += -msoft-float $(GCC_WARNINGS) $(OPTFLAGS) ifneq ($(DEBUG), Y) @@ -89,7 +89,7 @@ endif ifeq ($(ARCH), LINUX-SH) COMPILER = gcc CXX_COMPILER = g++ -TOOLSPREFIX =$(SHTOOLSPREFIX) +TOOLSPREFIX ?= $(SHTOOLSPREFIX) DEFINES += -DLINUX=1 -DUNIX=1 CFLAGS += -m1 -m3 $(GCC_WARNINGS) $(OPTFLAGS) LDFLAGS += @@ -98,7 +98,7 @@ endif ifeq ($(ARCH), LINUX-SPARC) COMPILER = gcc CXX_COMPILER = g++ -TOOLSPREFIX = +TOOLSPREFIX ?= DEFINES += -DLINUX=1 -DUNIX=1 -DMW_CPU_BIG_ENDIAN=1 CFLAGS += $(GCC_WARNINGS) $(OPTFLAGS) LDFLAGS += @@ -113,7 +113,7 @@ ifeq ($(ARCH), SOLARIS) COMPILER = gcc HOSTCC = gcc CXX_COMPILER = g++ -TOOLSPREFIX = +TOOLSPREFIX ?= DEFINES += -DUNIX=1 -DMW_CPU_BIG_ENDIAN=1 CFLAGS += $(GCC_WARNINGS) $(OPTFLAGS) LDFLAGS += -lsocket -lnsl -lrt @@ -123,7 +123,7 @@ ifeq ($(ARCH), TRIMEDIA) LUD_ROOT = ../../../../../../.. COMPILER = cc CXX_COMPILER = CC -TOOLSPREFIX = tm +TOOLSPREFIX ?= tm DEFINES += -DTRIMEDIA=1 -DTCS2 -DOSAL -DLUD_USE_MEMSPACE DEFINES += -DMW_NOSIGNALS -DMW_FEATURE_GDERROR=1 INCLUDEDIRS += -I$(LUD_ROOT)/src/include -I$(LUD_ROOT)/src/modules/fb/include @@ -137,7 +137,7 @@ endif ifeq ($(ARCH), FREEBSD-X86) COMPILER = gcc CXX_COMPILER = g++ -TOOLSPREFIX = +TOOLSPREFIX ?= DEFINES += -DUNIX=1 CFLAGS += -Wall $(OPTFLAGS) LDFLAGS += @@ -147,7 +147,7 @@ ifeq ($(ARCH), ELKS) COMPILER = bcc HOSTCC = gcc CXX_COMPILER = -TOOLSPREFIX = +TOOLSPREFIX ?= INCLUDEDIRS += -I/usr/bcc/include -I/home/greg/net/elks/include DEFINES += -DELKS=1 -DUNIX=1 -Dconst= -Dvolatile= CFLAGS += -0 -ansi -O @@ -157,7 +157,7 @@ endif ifeq ($(ARCH), DJGPP) COMPILER = gcc CXX_COMPILER = g++ -TOOLSPREFIX = +TOOLSPREFIX ?= DEFINES += -DDOS_DJGPP=1 -D_NAIVE_DOS_REGS=1 -DMSDOS=1 CFLAGS += -Wall $(OPTFLAGS) LDFLAGS += @@ -166,7 +166,7 @@ endif ifeq ($(ARCH), RTEMS) COMPILER = gcc CXX_COMPILER = g++ -TOOLSPREFIX = $(RTEMSTOOLSPREFIX) +TOOLSPREFIX ?= $(RTEMSTOOLSPREFIX) INCLUDEDIRS += -I$(RTEMS_BUILD)/$(RTEMS_TARGET)/$(RTEMS_BSP)/lib/include \ -I$(RTEMS_BUILD)/$(RTEMS_TARGET)/$(RTEMS_BSP)/lib/include/networking \ -I$(RTEMS_BUILD)/$(RTEMS_TARGET)/$(RTEMS_BSP)/lib/include/sys @@ -178,7 +178,7 @@ endif ifeq ($(ARCH), ECOS) COMPILER = gcc CXX_COMPILER = g++ - TOOLSPREFIX = $(ARMTOOLSPREFIX) + TOOLSPREFIX ?= $(ARMTOOLSPREFIX) ECOS_PREFIX = /work/iPAQ/ecos/install INCLUDEDIRS += -I$(ECOS_PREFIX)/include DEFINES += -D__ECOS -DUNIX=1 @@ -193,7 +193,7 @@ else COMPILER = gcc endif CXX_COMPILER = g++ -TOOLSPREFIX = +TOOLSPREFIX ?= #Note: to detect from C code, do "#ifdef __CYGWIN__" DEFINES += -DUNIX=1 CFLAGS += -Wall $(OPTFLAGS)