help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

question about conditionals and the CC command


From: Nolan Ring
Subject: question about conditionals and the CC command
Date: Sat, 15 Feb 2003 21:41:59 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0rc2) Gecko/20020618 Netscape/7.0b1

I have set the following conditional in my Makefile:

   ifeq "$(OS_VER)" "5.6"
   SLP_FLAG=-DNOSLP
   endif

The CFLAGS variable is defined to be:

   CFLAGS= -g -DDEBUG -mt -D_REENTRANT $(OFLAGS) $(INCLS) $(SLP_FLAG)

The CC command that is defined in the Makefile is conditionalized on OS version:


   $(AGENT): $(AGENT_OBJS)
   ifeq "$(OS_VER)" "5.6"
          $(CC) -i -o $(AGENT) -mt $(AGENT_OBJS) $(LIBDIRS)
   -R$(RUNTIME_LD_LIBRARY_PATH) -B static -lexpat -B dynamic-lfcgi
   -lsocket -lnsl -ldl -lcimapi
         chmod u+s $(AGENT)
   else
        $(CC) -i -o $(AGENT) -mt $(AGENT_OBJS) $(LIBDIRS)
   -R$(RUNTIME_LD_LIBRARY_PATH) -B static -lexpat -B dynamic -lfcgi
   -lsocket -lnsl -ldl -lcimapi -lslp -lsecdb
        chmod u+s $(AGENT)
   endif

On a 5.9 system the following command is run:

cc -g -DDEBUG -mt -D_REENTRANT -I/siskin1/build_area/ESM20/siskin_Platform/agent/csrc/arp/server/infrastructure/usr/src/include -I/lab/nest/reference_trees/ESM20_dev_env/fcgi/fcgi-devkit_2.2.0/include -I/siskin1/build_area/ESM20/siskin_Platform/agent/csrc/arp/server/cimapi/include -I/lab/nest/reference_trees/ESM20_dev_env/expat/expat-1.95.2/include -c -o cgi.o cgi.c

On a 5.6 system the following command is run:

make[2]: Entering directory 
`/build_area/siskin_Platform/agent/csrc/arp/server/infrastructure/usr/src/lib'
cc -i -o /build_area/siskin_Platform/agent/../dist/sparc_5.6/agent -mt agent.o 
cimxml.o cgi.o debug.o parsexml.o dispatch.o xmlhandlers.o marshall.o connect.o 
cimevent.o slist.o sbuf.o stack.o -L 
/lab/nest/reference_trees/ESM20_dev_env/fcgi/fcgi-devkit_2.2.0/libfcgi -L 
/lab/nest/reference_trees/ESM20_dev_env/expat/expat-1.95.2/lib -L /bu
ild_area/siskin_Platform/agent/../dist/sparc_5.6 
-R/lib:/usr/ucblib:/opt/SUNWnsm/lib:\$ORIGIN -B static -lexpat -B dynamic 
-lfcgi -lsocket -lnsl -ldl -lcimapi


When I explicitly add the $(CFLAGS) variable to the $(CC) command to the 5.6 version of the command I get the same command run for 5.6 and 5.9 systems.

Can someone please explain this to me?

Thanks very much.

Nolan Ring















reply via email to

[Prev in Thread] Current Thread [Next in Thread]