[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
need help with if conditional statement in my makefile
From: |
Suman Ojha |
Subject: |
need help with if conditional statement in my makefile |
Date: |
Tue, 1 Jun 2004 16:36:45 -0500 |
hi,
I have a makefile where I want to conditionally provide the macros.
I am working on Solaris7 and am on Bash shell.
I have seen different flavors of the conditional if statement at various
sites on the Internet including the GNU site, but none seem to work. I am
providing the same of code which needs to be executed conditionally. Hope
someone can help me spot the error
BUILD=DEBUG
--------------
--------------
ifeq ($BUILD),DEBUG)
CFLAGS = -g -mt -KPIC -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED
CXXFLAGS = -g -mt -KPIC -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED
else
CFLAGS = -mt -KPIC -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED
CXXFLAGS = -mt -KPIC -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED
endif
I have also tried other syntax like the following:
if [ ${BUILD} == DEBUG ] ; then \
CFLAGS = -g -mt -KPIC -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED ; \
CXXFLAGS = -g -mt -KPIC -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED ; \
else \
CFLAGS = -mt -KPIC -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED ;\
CXXFLAGS = -mt -KPIC -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED ;\
fi
Any help would be greatly appreciated!
thanks a lot/
Suman
Suman Ojha
Firstlogic Inc.
608-788-8154 (3167)
www.firstlogic.com
- need help with if conditional statement in my makefile,
Suman Ojha <=