Makefile

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
CC= g++ 
CCFLAGS= -std=c++11

SOURCES= example1_basic_usage.cpp \
		 example2_initializing_vector_with_values.cpp \
		 example3_inserting_and_erasing_elements.cpp \
		 example4_capacity_and_size_management.cpp \
		 example5_iterating_over_a_vector.cpp \
		 example6_two_dimenional_vectors.cpp
OBJECTS= $(SOURCES:.cpp=.o)
EXEC= $(SOURCES:.cpp=.x)
all: $(EXEC)

%.x: %.cpp
	$(CC) $(CCFLAGS) -o $@ $<

clean:
	rm -rf *.o *.x
Back to std_vector