Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Makefile help

Posted on 2010-08-24
4
Medium Priority
?
624 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 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
Suggested Courses

721 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