Search
 
SCRIPT & CODE EXAMPLE
 

CPP

Basic Makefile C++

CC=gcc
CXX=g++
RM=rm -f
CPPFLAGS=-g $(shell root-config --cflags)
LDFLAGS=-g $(shell root-config --ldflags)
LDLIBS=$(shell root-config --libs)

SRCS=tool.cc support.cc
OBJS=$(subst .cc,.o,$(SRCS))

all: tool

tool: $(OBJS)
    $(CXX) $(LDFLAGS) -o tool $(OBJS) $(LDLIBS)

tool.o: tool.cc support.hh

support.o: support.hh support.cc

clean:
    $(RM) $(OBJS)

distclean: clean
    $(RM) tool
Comment

Basic Makefile C++

CC=gcc
CXX=g++
RM=rm -f
CPPFLAGS=-g $(shell root-config --cflags)
LDFLAGS=-g $(shell root-config --ldflags)
LDLIBS=$(shell root-config --libs)

SRCS=tool.cc support.cc
OBJS=$(subst .cc,.o,$(SRCS))

all: tool

tool: $(OBJS)
    $(CXX) $(LDFLAGS) -o tool $(OBJS) $(LDLIBS)

tool.o: tool.cc support.hh

support.o: support.hh support.cc

clean:
    $(RM) $(OBJS)

distclean: clean
    $(RM) tool
Comment

PREVIOUS NEXT
Code Example
Cpp :: definition of singly linkedlist 
Cpp :: minimum or maximum in array c++ 
Cpp :: Valid Parentheses leetcode in c++ 
Cpp :: memcpy in cpp 
Cpp :: heap allocated array in c ++ 
Cpp :: C++ pointer to base class 
Cpp :: not c++ 
Cpp :: vector size c++ 
Cpp :: c++ comment 
Cpp :: cpp compiler online 
Cpp :: unordered_map in c++ 
Cpp :: ue4 c++ switch enum 
Cpp :: front priority queue cpp 
Cpp :: C++ Initialization of three-dimensional array 
Cpp :: string class in c++ 
Cpp :: short int range in c++ 
Cpp :: coinPiles 
Cpp :: time_t c++ stack overflow 
Cpp :: c++ fstream read line write ,creat file program 
Cpp :: nand in cpp 
Cpp :: error when using base class members 
Cpp :: Get the absolute path of a boost filePath as a string 
Cpp :: gcd multi num 
Cpp :: zsh: segmentation fault ./provided_files.exe erosion X . 
Cpp :: sfml time set 
Cpp :: vermífugo significado 
Cpp :: ue4 c++ bool to text 
Cpp :: fibonacci sequence c++ 
Cpp :: c++ constructor initializing list 
Cpp :: The smallest element from three 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =