Solved

Makefile help

Posted on 2010-08-24
4
620 Views
Last Modified: 2012-05-10
OOCFG=/home/y/share/ya_cfg
include $(OOCFG)/Make.defs

# Set the list of C++ source files here
CXXSRC  = \
        thFailed.C \
        ResponseCode.C \
        ia_log.C \
        dh_logger.C \
        p_th_plain.C \
        p_th_mycookie.C \
        p_th_myecookie.C \
        p_th_mycookieb64.C \
        p_th_mypki.C \
        mod_ail_p_th.C \
        p_th.C \
        $(NULL)

EXPORTED_LIBPATH_DISABLE=yes

LIB_NAME        = apache_mod_ail_p_th
SHLIB_VERSION = handler

LDEF    =  -g -O2 -Wall -Wimplicit -Werror -Wwrite-strings \
        $(LBSD_FLAG) -DEAPI $(EXTRALDEFS)  $(LDEBUGGING) \
        -D_FILE_OFFSET_BITS=64 \
                $(NULL)
#               -DDH_LOG

LINC    =       \
                -I$(ROOT)/include/ail/common \
                -I$(ROOT)/include/ail/rocket/common \
                -I$(ROOT)/include/ailext \
                -I/usr/local/include

LLDLIBS = \
                -lail_login \
                -lydod_login \
                -lailext \
                -lRocketStat \
                -lyax \
                -lyck \
                -lyprof \
                -lm \
                -lycfl \
                -lminers_dh_logconverter \
                -lminers_dh_log \
                                        $(NULL)

                        ifeq ($(YMK_OS),FreeBSD)
                        LLDLIBS += \
                                -lcompat \
                                -lminers_dh_ynet_sender \
                                $(NULL)
                        else
                        # Linux
                        LLDLIBS += \
                                -lyut_datetime \
                                $(NULL)
                        endif

                        # Set the following variables as necessary to customize this directory
                        # Do not add any build rules until *after* the include of Make.cfg
                        # If this is a directory with subdirectories to build, set SUBDIRS
                        SUBDIRS =

                        include $(OOCFG)/Make.rules
                        # Do not place any rules or targets above this line

                        # Include Buildyblocks rules
                        include /home/y/share/ya_cfg/buildyblocks/Make.rules
                        BUILDYBLOCKS_DIR=./build/buildyblocks
                        OS_PLATFORM=$(shell inst platform os)
                        STATE_FILE=build_$(OS_PLATFORM).state
                        HOST_NAME=apache_mod_ail_p_th.build.mail.corp.ya.com:apache_mod_ymai
                        l_p_th_$(OS_PLATFORM)_build

                        update-state-file:
                                /home/y/libexec/mail/ymGetBuildState.pl -host $(HOST_NAME) -directory $(
                        BUILDYBLOCKS_DIR) || exit $$?
                                /usr/local/bin/inst restore -file $(BUILDYBLOCKS_DIR)/$(STATE_FILE) ||
                        /home/y/bin/svn revert $(BUILDYBLOCKS_DIR)/$(STATE_FILE)
                                /home/y/bin/svn commit -m"Auto-updated $(BUILDYBLOCKS_DIR)/$(STATE_FILE)
                        " $(BUILDYBLOCKS_DIR)/$(STATE_FILE) || exit $$?

                        clean::
                                $(MAKE) -C ./unit-tests clean
                                $(MAKE) -C ./package clean
                                $(MAKE) -C ./package/conf clean

                        commit:: update-state-file clean all
                        
                        
                                $(MAKE) -C ./unit-tests cppunit
                                $(MAKE) -C ./package commit
                                $(MAKE) -C ./package/conf commit

                        SECONDARY_BIM=./build/buildyblocks/secondary_build.bim
                        secondary: BB_BIM_FILE=$(SECONDARY_BIM)

                        secondary-build: update-state-file clean all
                                $(MAKE) -C ./unit-tests cppunit
                                $(MAKE) -C ./package secondary

                        secondary-build-conf:
                                $(MAKE) -C ./package/conf secondary

                        ifeq ("$(OS)", "rhel")
                        secondary: secondary-build BB_Dist_Push
                        else
                        secondary: secondary-build secondary-build-conf BB_Dist_Push
                        endif
                                                
0
Comment
Question by:Vlearns
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 40

Expert Comment

by:evilrix
ID: 33516907
Nice makefile - what's the question?
0
 

Author Comment

by:Vlearns
ID: 33516911
hi

i have the makefile above and i need to add code coverage using the coverity tool....
am new to makefiles and am trying to understand what this file is doing...

cxxsrc seems to indicate the code files

what do ldef, lic lldlibs do?

how do i add coverity to this makefile, has anyone ttied it before?
i am on freebsd

thanks


0
 
LVL 12

Accepted Solution

by:
w00te earned 500 total points
ID: 33522477
LDEF is a short macro/alias for your compiler commands, LLDLIBS seems to be a macro for pullin gin the required libraries (it does some based on OS type, so yours will follow the freeBSD path it has noted).  LINC looks like its pulling in headers common to the project.
OOCFG=/home/y/share/ya_cfg is another macro/alias for a directory which seems to contain the makefile with build rules:  Make.rules
clean:: nice macro that you can use such as:
make clean
to remove all files built by the make file when you run it.
and as you probably noticed, you can use these marcros/aliases after definition with the $(name) syntax.
-w00te
0
 
LVL 12

Expert Comment

by:w00te
ID: 33522492
and I've never used coverity, so I'm tagging out :p sorry man!
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question