Horje
makefile for single cpp file Code Example
makefile for single cpp file
SOURCES := t.cpp
# Objs are all the sources, with .cpp replaced by .o
OBJS := $(SOURCES:.cpp=.o)

all: t

# Compile the binary 't' by calling the compiler with cflags, lflags, and any libs (if defined) and the list of objects.
t: $(OBJS)
    $(CC) $(CFLAGS) -o t $(OBJS) $(LFLAGS) $(LIBS)

# Get a .o from a .cpp by calling compiler with cflags and includes (if defined)
.cpp.o:
    $(CC) $(CFLAGS) $(INCLUDES) -c $<




Cpp

Related
cout alternative c++ Code Example cout alternative c++ Code Example
an array that take different data type c++ Code Example an array that take different data type c++ Code Example
get first element of set c++ Code Example get first element of set c++ Code Example
transform c++ Code Example transform c++ Code Example
climits in cpp Code Example climits in cpp Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8