Makefile

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

SOURCES= example1_linked_list.cpp \
		 example2_doubly_linked_list_with_tail_pointer.cpp \
		 example3_circular_linked_list.cpp \
		 example4_basic_usage_std_list.cpp \
		 example5_std_forward_for_memory_efficient_operations.cpp \
		 example6_std_list_with_custom_objects.cpp
OBJECTS= $(SOURCES:.cpp=.o)
EXEC= $(SOURCES:.cpp=.x)
all: $(EXEC)

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

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