Makefile

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

SOURCES=example1_removing_const_from_pointer.cpp\
		example2_using_const_cast_with_references.cpp\
		example3_const_cast_with_member_functions.cpp\
		example4_third_party_APIs.cpp
OBJECTS= $(SOURCES:.cpp=.o)
EXEC= $(SOURCES:.cpp=.x)
all: $(EXEC)

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

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