mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
fixed xdc generation, added lib target, load curl.nlm into ring3 by default.
This commit is contained in:
parent
eb044f8787
commit
08bf0907d4
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
# Edit the path below to point to the base of your Novell NDK.
|
# Edit the path below to point to the base of your Novell NDK.
|
||||||
ifndef NDKBASE
|
ifndef NDKBASE
|
||||||
NDKBASE = /novell
|
NDKBASE = c:/novell
|
||||||
endif
|
endif
|
||||||
INSTDIR = ..\curl-$(LIBCURL_VERSION_STR)-bin-nw
|
INSTDIR = ..\curl-$(LIBCURL_VERSION_STR)-bin-nw
|
||||||
|
|
||||||
@ -34,6 +34,7 @@ endif
|
|||||||
# must be equal to DEBUG or NDEBUG
|
# must be equal to DEBUG or NDEBUG
|
||||||
DB = NDEBUG
|
DB = NDEBUG
|
||||||
# DB = DEBUG
|
# DB = DEBUG
|
||||||
|
# DB = CURLDEBUG
|
||||||
# Optimization: -O<n> or debugging: -g
|
# Optimization: -O<n> or debugging: -g
|
||||||
ifeq ($(DB),NDEBUG)
|
ifeq ($(DB),NDEBUG)
|
||||||
OPT = -O2
|
OPT = -O2
|
||||||
@ -65,7 +66,9 @@ CFLAGS = $(OPT) -D$(DB) -DNETWARE -nostdinc
|
|||||||
ifeq ($(CC),mwccnlm)
|
ifeq ($(CC),mwccnlm)
|
||||||
LD = mwldnlm
|
LD = mwldnlm
|
||||||
LDFLAGS = -nostdlib $(PRELUDE) $(OBJDIR)/*.o -o $(OBJDIR)/$(TARGET).nlm -commandfile
|
LDFLAGS = -nostdlib $(PRELUDE) $(OBJDIR)/*.o -o $(OBJDIR)/$(TARGET).nlm -commandfile
|
||||||
CFLAGS += -gccinc -inline off -opt nointrinsics -proc 586
|
AR = mwldnlm
|
||||||
|
ARFLAGS = -type library -w nocmdline $(OBJDIR)/*.o -o
|
||||||
|
CFLAGS += -msgstyle gcc -gccinc -inline off -opt nointrinsics -proc 586
|
||||||
CFLAGS += -relax_pointers
|
CFLAGS += -relax_pointers
|
||||||
#CFLAGS += -w on
|
#CFLAGS += -w on
|
||||||
ifeq ($(LIBARCH),LIBC)
|
ifeq ($(LIBARCH),LIBC)
|
||||||
@ -81,6 +84,8 @@ endif
|
|||||||
else
|
else
|
||||||
LD = nlmconv
|
LD = nlmconv
|
||||||
LDFLAGS = -T
|
LDFLAGS = -T
|
||||||
|
AR = ar
|
||||||
|
ARFLAGS = -cq
|
||||||
CFLAGS += -fno-builtin -fpack-struct -fpcc-struct-return
|
CFLAGS += -fno-builtin -fpack-struct -fpcc-struct-return
|
||||||
CFLAGS += -Wall # -pedantic
|
CFLAGS += -Wall # -pedantic
|
||||||
ifeq ($(LIBARCH),LIBC)
|
ifeq ($(LIBARCH),LIBC)
|
||||||
@ -122,6 +127,12 @@ endif
|
|||||||
CFLAGS += $(INCLUDES)
|
CFLAGS += $(INCLUDES)
|
||||||
|
|
||||||
ifeq ($(MTSAFE),YES)
|
ifeq ($(MTSAFE),YES)
|
||||||
|
XDCOPT = -n
|
||||||
|
endif
|
||||||
|
ifeq ($(MTSAFE),NO)
|
||||||
|
XDCOPT = -u
|
||||||
|
endif
|
||||||
|
ifdef XDCOPT
|
||||||
XDCDATA = $(OBJDIR)/$(TARGET).xdc
|
XDCDATA = $(OBJDIR)/$(TARGET).xdc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -182,10 +193,14 @@ OBJS = \
|
|||||||
$(OBJDIR)/hostsyn.o \
|
$(OBJDIR)/hostsyn.o \
|
||||||
$(OBJDIR)/hostthre.o \
|
$(OBJDIR)/hostthre.o \
|
||||||
$(OBJDIR)/inet_ntop.o \
|
$(OBJDIR)/inet_ntop.o \
|
||||||
$(OBJDIR)/nwlib.o
|
|
||||||
|
|
||||||
|
OBJL = $(OBJS) $(OBJDIR)/nwlib.o
|
||||||
|
|
||||||
all: $(OBJDIR) $(OBJDIR)/version.inc $(OBJDIR)/$(TARGET).nlm
|
nlm: $(OBJDIR) $(OBJDIR)/version.inc $(OBJDIR)/$(TARGET).nlm
|
||||||
|
|
||||||
|
lib: $(OBJDIR) $(OBJDIR)/$(TARGET).lib
|
||||||
|
|
||||||
|
all: lib nlm
|
||||||
|
|
||||||
$(OBJDIR)/%.o: %.c
|
$(OBJDIR)/%.o: %.c
|
||||||
# @echo Compiling $<
|
# @echo Compiling $<
|
||||||
@ -215,7 +230,12 @@ $(INSTDIR):
|
|||||||
$(OBJDIR):
|
$(OBJDIR):
|
||||||
@mkdir $(OBJDIR)
|
@mkdir $(OBJDIR)
|
||||||
|
|
||||||
$(OBJDIR)/$(TARGET).nlm: $(OBJS) $(OBJDIR)/$(TARGET).def $(XDCDATA)
|
$(OBJDIR)/$(TARGET).lib: $(OBJS)
|
||||||
|
@echo Creating $@
|
||||||
|
@-$(RM) $@
|
||||||
|
@$(AR) $(ARFLAGS) $@ $^
|
||||||
|
|
||||||
|
$(OBJDIR)/$(TARGET).nlm: $(OBJL) $(OBJDIR)/$(TARGET).def $(XDCDATA)
|
||||||
@echo Linking $@
|
@echo Linking $@
|
||||||
@-$(RM) $@
|
@-$(RM) $@
|
||||||
@$(LD) $(LDFLAGS) $(OBJDIR)/$(TARGET).def
|
@$(LD) $(LDFLAGS) $(OBJDIR)/$(TARGET).def
|
||||||
@ -262,11 +282,7 @@ ifeq ($(LIBARCH),CLIB)
|
|||||||
# @echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapx.imp$(DL) >> $@
|
# @echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapx.imp$(DL) >> $@
|
||||||
@echo $(DL)module clib$(DL) >> $@
|
@echo $(DL)module clib$(DL) >> $@
|
||||||
else
|
else
|
||||||
ifeq ($(LD),nlmconv)
|
|
||||||
@echo $(DL)flag_on 64$(DL) >> $@
|
@echo $(DL)flag_on 64$(DL) >> $@
|
||||||
else
|
|
||||||
@echo $(DL)autounload$(DL) >> $@
|
|
||||||
endif
|
|
||||||
@echo $(DL)pseudopreemption$(DL) >> $@
|
@echo $(DL)pseudopreemption$(DL) >> $@
|
||||||
@echo $(DL)start _LibCPrelude$(DL) >> $@
|
@echo $(DL)start _LibCPrelude$(DL) >> $@
|
||||||
@echo $(DL)exit _LibCPostlude$(DL) >> $@
|
@echo $(DL)exit _LibCPostlude$(DL) >> $@
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
# Edit the path below to point to the base of your Novell NDK.
|
# Edit the path below to point to the base of your Novell NDK.
|
||||||
ifndef NDKBASE
|
ifndef NDKBASE
|
||||||
NDKBASE = /novell
|
NDKBASE = c:/novell
|
||||||
endif
|
endif
|
||||||
INSTDIR = ..\curl-$(LIBCURL_VERSION_STR)-bin-nw
|
INSTDIR = ..\curl-$(LIBCURL_VERSION_STR)-bin-nw
|
||||||
|
|
||||||
@ -26,6 +26,8 @@ STACK = 64000
|
|||||||
SCREEN = $(TARGET) commandline utility
|
SCREEN = $(TARGET) commandline utility
|
||||||
MODULES = libcurl.nlm
|
MODULES = libcurl.nlm
|
||||||
IMPORTS = @../lib/libcurl.imp
|
IMPORTS = @../lib/libcurl.imp
|
||||||
|
# Comment the line below if you dont want to load protected automatically.
|
||||||
|
LDRING = 3
|
||||||
|
|
||||||
# Edit the var below to point to your lib architecture.
|
# Edit the var below to point to your lib architecture.
|
||||||
ifndef LIBARCH
|
ifndef LIBARCH
|
||||||
@ -125,6 +127,12 @@ endif
|
|||||||
CFLAGS += $(INCLUDES)
|
CFLAGS += $(INCLUDES)
|
||||||
|
|
||||||
ifeq ($(MTSAFE),YES)
|
ifeq ($(MTSAFE),YES)
|
||||||
|
XDCOPT = -n
|
||||||
|
endif
|
||||||
|
ifeq ($(MTSAFE),NO)
|
||||||
|
XDCOPT = -u
|
||||||
|
endif
|
||||||
|
ifdef XDCOPT
|
||||||
XDCDATA = $(OBJDIR)/$(TARGET).xdc
|
XDCDATA = $(OBJDIR)/$(TARGET).xdc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -205,6 +213,12 @@ endif
|
|||||||
ifdef XDCDATA
|
ifdef XDCDATA
|
||||||
@echo $(DL)xdcdata $(XDCDATA)$(DL) >> $@
|
@echo $(DL)xdcdata $(XDCDATA)$(DL) >> $@
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(LDRING),0)
|
||||||
|
@echo $(DL)flag_on 16$(DL) >> $@
|
||||||
|
endif
|
||||||
|
ifeq ($(LDRING),3)
|
||||||
|
@echo $(DL)flag_on 512$(DL) >> $@
|
||||||
|
endif
|
||||||
ifeq ($(LIBARCH),CLIB)
|
ifeq ($(LIBARCH),CLIB)
|
||||||
@echo $(DL)start _Prelude$(DL) >> $@
|
@echo $(DL)start _Prelude$(DL) >> $@
|
||||||
@echo $(DL)exit _Stop$(DL) >> $@
|
@echo $(DL)exit _Stop$(DL) >> $@
|
||||||
@ -217,11 +231,7 @@ ifeq ($(LIBARCH),CLIB)
|
|||||||
# @echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapx.imp$(DL) >> $@
|
# @echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapx.imp$(DL) >> $@
|
||||||
@echo $(DL)module clib$(DL) >> $@
|
@echo $(DL)module clib$(DL) >> $@
|
||||||
else
|
else
|
||||||
ifeq ($(LD),nlmconv)
|
|
||||||
@echo $(DL)flag_on 64$(DL) >> $@
|
@echo $(DL)flag_on 64$(DL) >> $@
|
||||||
else
|
|
||||||
@echo $(DL)autounload$(DL) >> $@
|
|
||||||
endif
|
|
||||||
@echo $(DL)pseudopreemption$(DL) >> $@
|
@echo $(DL)pseudopreemption$(DL) >> $@
|
||||||
@echo $(DL)start _LibCPrelude$(DL) >> $@
|
@echo $(DL)start _LibCPrelude$(DL) >> $@
|
||||||
@echo $(DL)exit _LibCPostlude$(DL) >> $@
|
@echo $(DL)exit _LibCPostlude$(DL) >> $@
|
||||||
|
Loading…
Reference in New Issue
Block a user