some more makefile tweaks and hacks to deal with both lib architectures.

This commit is contained in:
Gunter Knauf
2007-07-02 18:42:14 +00:00
parent 55cd28283c
commit 5a051617f3
2 changed files with 29 additions and 23 deletions

View File

@@ -60,9 +60,6 @@ else
OBJDIR = debug OBJDIR = debug
endif endif
# Include the version info retrieved from curlver.h
-include $(OBJDIR)/version.inc
# The following line defines your compiler. # The following line defines your compiler.
ifdef METROWERKS ifdef METROWERKS
# MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support # MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support
@@ -82,6 +79,12 @@ CP = cp -afv
# http://www.gknw.net/development/prgtools/mkxdc.zip # http://www.gknw.net/development/prgtools/mkxdc.zip
MPKXDC = mkxdc MPKXDC = mkxdc
# LIBARCH_U = $(shell $(AWK) 'BEGIN {print toupper(ARGV[1])}' $(LIBARCH))
LIBARCH_L = $(shell $(AWK) 'BEGIN {print tolower(ARGV[1])}' $(LIBARCH))
# Include the version info retrieved from curlver.h
-include $(OBJDIR)/version.inc
# Global flags for all compilers # Global flags for all compilers
CFLAGS = $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc CFLAGS = $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc
@@ -100,9 +103,9 @@ ifeq ($(LIBARCH),LIBC)
CFLAGS += -align 4 CFLAGS += -align 4
else else
# PRELUDE = $(SDK_CLIB)/imports/clibpre.o # PRELUDE = $(SDK_CLIB)/imports/clibpre.o
# to avoid the __init... whoes dont use prelude from NDK # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj" PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj"
CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h" # CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h"
CFLAGS += -align 1 CFLAGS += -align 1
endif endif
else else
@@ -118,8 +121,8 @@ ifeq ($(LIBARCH),LIBC)
PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
else else
# PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o # PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
# to avoid the __init... whoes dont use prelude from NDK # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
# http://www.gknw.net/development/mk_nlm/gcc_pre.exe # http://www.gknw.net/development/mk_nlm/gcc_pre.zip
PRELUDE = $(NDK_ROOT)/pre/prelude.o PRELUDE = $(NDK_ROOT)/pre/prelude.o
CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
endif endif
@@ -142,10 +145,10 @@ endif
ifdef WITH_ZLIB ifdef WITH_ZLIB
INCLUDES += -I$(ZLIB_PATH) INCLUDES += -I$(ZLIB_PATH)
ifdef LINK_STATIC ifdef LINK_STATIC
LDLIBS += $(ZLIB_PATH)/nw/libz.$(LIBEXT) LDLIBS += $(ZLIB_PATH)/nw/$(LIBARCH)/libz.$(LIBEXT)
else else
MODULES += libz.nlm MODULES += libz.nlm
IMPORTS += @$(ZLIB_PATH)/nw/libz.imp IMPORTS += @$(ZLIB_PATH)/nw/$(LIBARCH)/libz.imp
endif endif
endif endif
ifdef WITH_SSH2 ifdef WITH_SSH2
@@ -158,9 +161,9 @@ else
endif endif
endif endif
ifdef WITH_SSL ifdef WITH_SSL
INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_libc -I$(OPENSSL_PATH)/outinc_nw_libc/openssl INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L) -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)/openssl
LDLIBS += $(OPENSSL_PATH)/out_nw_libc/ssl.$(LIBEXT) LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/ssl.$(LIBEXT)
LDLIBS += $(OPENSSL_PATH)/out_nw_libc/crypto.$(LIBEXT) LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT)
IMPORTS += GetProcessSwitchCount RunningProcess IMPORTS += GetProcessSwitchCount RunningProcess
endif endif

View File

@@ -61,9 +61,6 @@ else
OBJDIR = debug OBJDIR = debug
endif endif
# Include the version info retrieved from curlver.h
-include $(OBJDIR)/version.inc
# The following line defines your compiler. # The following line defines your compiler.
ifdef METROWERKS ifdef METROWERKS
# MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support # MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support
@@ -82,6 +79,12 @@ CP = cp -afv
# http://www.gknw.net/development/prgtools/mkxdc.zip # http://www.gknw.net/development/prgtools/mkxdc.zip
MPKXDC = mkxdc MPKXDC = mkxdc
# LIBARCH_U = $(shell $(AWK) 'BEGIN {print toupper(ARGV[1])}' $(LIBARCH))
LIBARCH_L = $(shell $(AWK) 'BEGIN {print tolower(ARGV[1])}' $(LIBARCH))
# Include the version info retrieved from curlver.h
-include $(OBJDIR)/version.inc
# Global flags for all compilers # Global flags for all compilers
CFLAGS = $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc CFLAGS = $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc
@@ -97,9 +100,9 @@ ifeq ($(LIBARCH),LIBC)
CFLAGS += -align 4 CFLAGS += -align 4
else else
# PRELUDE = $(SDK_CLIB)/imports/clibpre.o # PRELUDE = $(SDK_CLIB)/imports/clibpre.o
# to avoid the __init... whoes dont use prelude from NDK # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj" PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj"
CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h" # CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h"
CFLAGS += -align 1 CFLAGS += -align 1
endif endif
else else
@@ -112,8 +115,8 @@ ifeq ($(LIBARCH),LIBC)
PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
else else
# PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o # PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
# to avoid the __init... whoes dont use prelude from NDK # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
# http://www.gknw.net/development/mk_nlm/gcc_pre.exe # http://www.gknw.net/development/mk_nlm/gcc_pre.zip
PRELUDE = $(NDK_ROOT)/pre/prelude.o PRELUDE = $(NDK_ROOT)/pre/prelude.o
CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
endif endif
@@ -138,10 +141,10 @@ endif
ifdef WITH_ZLIB ifdef WITH_ZLIB
INCLUDES += -I$(ZLIB_PATH) INCLUDES += -I$(ZLIB_PATH)
ifdef LINK_STATIC ifdef LINK_STATIC
LDLIBS += $(ZLIB_PATH)/nw/libz.$(LIBEXT) LDLIBS += $(ZLIB_PATH)/nw/$(LIBARCH)/libz.$(LIBEXT)
else else
MODULES += libz.nlm MODULES += libz.nlm
IMPORTS += @$(ZLIB_PATH)/nw/libz.imp IMPORTS += @$(ZLIB_PATH)/nw/$(LIBARCH)/libz.imp
endif endif
endif endif
ifdef WITH_SSH2 ifdef WITH_SSH2
@@ -154,8 +157,8 @@ else
endif endif
endif endif
ifdef WITH_SSL ifdef WITH_SSL
LDLIBS += $(OPENSSL_PATH)/out_nw_libc/ssl.$(LIBEXT) LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/ssl.$(LIBEXT)
LDLIBS += $(OPENSSL_PATH)/out_nw_libc/crypto.$(LIBEXT) LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT)
IMPORTS += GetProcessSwitchCount RunningProcess IMPORTS += GetProcessSwitchCount RunningProcess
endif endif