Samba 1.9.18 on Unixware 2.1.2, Makefile problem (& solution, sorta)

Cameron, Steve Steve.Cameron at
Thu Jan 8 15:29:32 GMT 1998

Hello Samba gurus:  I apologize if I'm not following some established
protocol, I'm pretty new to samba and to this list.  I just tried
compiling samba 1.9.18 on UnixWare 2.1.2 and ran into a problem with
UnixWare's /usr/ccs/bin/cc: it doesn't deal with the "-o" option in
combination with the "-c" option well at all.  It either ignores the
"-o" or complains that it would result in the object file being
overwritten by the executable, depending on if the value given for the
-o option matches whate the compiler plans on putting the .o file

Here's a semi-brain-dead patch to the Makefile that will make samba
compile on UnixWare 2.1.2.  Perhaps someone could come up with something
more reasonable that's also portable.  Not beimg much of a Makefile
hacker myself, I'm happy to have something that simply works for me.
Probably I could avoid all this by just using gcc and GNU make, but I
don't have them installed (yet).

I also got some warnings about arguments mismatched to function
prototypes, but I haven't looked into that yet.

Hope this is of some use to somebody.
-- Steve Cameron

*** Makefile.orig	Wed Jan  7 17:06:28 1998
--- Makefile	Thu Jan  8 10:13:19 1998
*** 722,728 ****
  .c.o: $(INCLUDES)
  	@echo Compiling $*.c
! 	@$(CC) $(CFLAGS) -c $(srcdir)$*.c -o $(srcdir)$*.o
  	@echo Linking smbd
--- 722,731 ----
  .c.o: $(INCLUDES)
  	@echo Compiling $*.c
! 	@$(CC) $(CFLAGS) -c $(srcdir)$*.c
! 	cp "`basename $*.o`" zzz.o
! 	cp zzz.o $(srcdir)$*.o
  	@echo Linking smbd

More information about the samba mailing list