Solved

Makefile help

Posted on 2010-08-24
4
613 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
  • 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

785 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