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_implementation.cpp \
		 example2_with_insertion_and_deletion.cpp \
		 example3_with_iterator.cpp \
		 example4_doubly_linked_list_using_std_list.cpp \
		 example5_advanced_ops_using_std_list.cpp \
		 example6_custom_comparator_and_sorting.cpp
OBJECTS= $(SOURCES:.cpp=.o)
EXEC= $(SOURCES:.cpp=.x)
all: $(EXEC)

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

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