diff options
-rw-r--r-- | ares/Makefile.netware | 79 |
1 files changed, 43 insertions, 36 deletions
diff --git a/ares/Makefile.netware b/ares/Makefile.netware index 3364f8246..d7d03efe6 100644 --- a/ares/Makefile.netware +++ b/ares/Makefile.netware @@ -17,11 +17,12 @@ INSTDIR = ../curl-$(LIBCURL_VERSION_STR)-bin-nw endif # Edit the vars below to change NLM target settings. -TARGET = adig -LTARGET = libcares +TARGETS = adig.nlm ahost.nlm +LTARGET = libcares.lib +TARGET = test VERSION = $(LIBCURL_VERSION) COPYR = Copyright (c) 1996 - 2004, Daniel Stenberg, <daniel@haxx.se> -DESCR = cURL $(TARGET) $(LIBCURL_VERSION_STR) - http://curl.haxx.se +DESCR = cURL $(subst .def,,$(notdir $@)) $(LIBCURL_VERSION_STR) - http://curl.haxx.se MTSAFE = YES STACK = 64000 SCREEN = none @@ -70,7 +71,8 @@ CFLAGS += -D_AIX ifeq ($(CC),mwccnlm) LD = mwldnlm -LDFLAGS = -nostdlib $(PRELUDE) $(OBJDIR)/*.o -o $(OBJDIR)/$(TARGET).nlm -commandfile +#LDFLAGS = -nostdlib $(PRELUDE) $(OBJS) -o $(OBJDIR)/$(TARGET).nlm -commandfile +LDFLAGS = -nostdlib $(PRELUDE) $(OBJS) $(<:.def=.o) -o $@ -commandfile AR = mwldnlm ARFLAGS = -type library -w nocmdline $(OBJDIR)/*.o -o CFLAGS += -msgstyle gcc -gccinc -inline off -opt nointrinsics -proc 586 @@ -90,7 +92,7 @@ LDFLAGS = -T AR = ar ARFLAGS = -cq CFLAGS += -fno-builtin -fpack-struct -fpcc-struct-return -CFLAGS += -Wall # -pedantic +CFLAGS += -Wall -Wno-format # -pedantic ifeq ($(LIBARCH),LIBC) PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o else @@ -135,63 +137,67 @@ DL = ' #-include $(NDKBASE)/nlmconv/ncpfs.inc endif -OBJS := $(patsubst %.c,$(OBJDIR)/%.o,$(wildcard ares*.c)) +.SUFFIXES: +.SUFFIXES: .c .o .nlm -OBJNLM = $(OBJS) $(OBJDIR)/adig.o +OBJS := $(patsubst %.c,$(OBJDIR)/%.o,$(wildcard ares_*.c)) -all: lib nlm +all: prebuild $(LTARGET) $(TARGETS) -lib: prebuild $(LTARGET).lib +lib: prebuild $(LTARGET) -nlm: prebuild $(TARGET).nlm +nlm: prebuild $(TARGETS) +#nlm: prebuild $(patsubst %,%.nlm,$(TARGETS)) prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h arpa/nameser.h -$(OBJDIR)/%.o: %.c -# @echo Compiling $< - $(CC) $(CFLAGS) -c $< -o $@ - -$(OBJDIR)/version.inc: ../include/curl/curlver.h $(OBJDIR) - @echo Creating $@ - @awk -f ../packages/NetWare/get_ver.awk $< > $@ - dist: all - -$(RM) $(OBJDIR)/*.o $(OBJDIR)/$(TARGET).map $(OBJDIR)/$(TARGET).ncv - -$(RM) $(OBJDIR)/$(TARGET).def $(OBJDIR)/version.inc $(XDCDATA) + -$(RM) $(OBJS) $(OBJDIR)/*.map $(OBJDIR)/*.ncv + -$(RM) $(OBJDIR)/*.def $(OBJDIR)/*.xdc $(OBJDIR)/version.inc install: $(INSTDIR) all - @$(CP) $(TARGET).nlm $(INSTDIR) + @$(CP) *.nlm $(INSTDIR) @$(CP) ../CHANGES $(INSTDIR) @$(CP) ../COPYING $(INSTDIR) @$(CP) ../README $(INSTDIR) @$(CP) ../RELEASE-NOTES $(INSTDIR) clean: - -$(RM) $(LTARGET).lib $(LTARGET).nlm config.h + -$(RM) $(LTARGET) $(TARGETS) config.h -$(RM) -r $(OBJDIR) -$(RM) -r arpa +%.lib: $(OBJS) + @echo Creating $@ + @-$(RM) $@ + @$(AR) $(ARFLAGS) $@ $^ + +#$(TARGET).nlm: $(OBJNLM) $(OBJDIR)/$(TARGET).def $(XDCDATA) +%.nlm: $(OBJDIR)/%.def $(OBJDIR)/%.o $(OBJDIR)/%.xdc $(OBJS) + @echo Linking $@ + @-$(RM) $@ + $(LD) $(LDFLAGS) $< + $(INSTDIR): @mkdir $(INSTDIR) $(OBJDIR): @mkdir $(OBJDIR) -$(LTARGET).lib: $(OBJS) - @echo Creating $@ - @-$(RM) $@ - @$(AR) $(ARFLAGS) $@ $^ +$(OBJDIR)/%.o: %.c +# @echo Compiling $< + $(CC) $(CFLAGS) -c $< -o $@ -$(TARGET).nlm: $(OBJNLM) $(OBJDIR)/$(TARGET).def $(XDCDATA) - @echo Linking $@ - @-$(RM) $@ - @$(LD) $(LDFLAGS) $(OBJDIR)/$(TARGET).def +$(OBJDIR)/version.inc: ../include/curl/curlver.h $(OBJDIR) + @echo Creating $@ + @awk -f ../packages/NetWare/get_ver.awk $< > $@ $(OBJDIR)/%.xdc: Makefile.netware @echo Creating $@ @$(MPKXDC) $(XDCOPT) $@ $(OBJDIR)/%.def: Makefile.netware + @echo Creating $@ @echo $(DL)# DEF file for linking with $(LD)$(DL) > $@ @echo $(DL)# Do not edit this file - it is created by make!$(DL) >> $@ @echo $(DL)# All your changes will be lost!!$(DL) >> $@ @@ -213,9 +219,9 @@ endif ifeq ($(DB),DEBUG) @echo $(DL)debug$(DL) >> $@ endif - @echo $(DL)threadname "$(TARGET)"$(DL) >> $@ -ifdef XDCDATA - @echo $(DL)xdcdata $(XDCDATA)$(DL) >> $@ + @echo $(DL)threadname "$^"$(DL) >> $@ +ifdef XDCOPT + @echo $(DL)xdcdata $(<:.def=.xdc)$(DL) >> $@ endif ifeq ($(LDRING),0) @echo $(DL)flag_on 16$(DL) >> $@ @@ -257,9 +263,10 @@ ifdef IMPORTS @echo $(DL)import $(IMPORTS)$(DL) >> $@ endif ifeq ($(LD),nlmconv) - @echo $(DL)input $(OBJNLM)$(DL) >> $@ + @echo $(DL)input $(OBJS)$(DL) >> $@ @echo $(DL)input $(PRELUDE)$(DL) >> $@ - @echo $(DL)output $(TARGET).nlm$(DL) >> $@ +# @echo $(DL)output $(patsubst %.def,%.nlm,$(notdir $@))$(DL) >> $@ + @echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@ endif config.h: Makefile.netware @@ -327,7 +334,7 @@ endif arpa/nameser.h: nameser.h @echo Fix missing header $@ - @mkdir arpa + @-mkdir arpa @$(CP) $< arpa |