forked from Mooophy/Cpp-Primer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revise makefile before chapter 13 to add new cpp files ; add empty ma…
…in function to make the cpp file compiled.
- Loading branch information
mudongliang
committed
Mar 7, 2015
1 parent
338070e
commit ca8606d
Showing
17 changed files
with
87 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,3 +47,9 @@ std::ostream& print(std::ostream &out, const QueryResult& qr) | |
} | ||
return out; | ||
} | ||
|
||
int main() | ||
{ | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,3 +47,9 @@ std::ostream& print(std::ostream &out, const QueryResult& qr) | |
} | ||
return out; | ||
} | ||
|
||
int main() | ||
{ | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,16 @@ | ||
# executable files for this directory | ||
OBJECTS = ex12_06 ex12_07 ex12_10 ex12_11 ex12_13 ex12_14 ex12_15 \ | ||
ex12_16 ex12_23 ex12_24 ex12_26 ex12_28 | ||
|
||
OBJECTS = ex12_06 ex12_07 ex12_10 ex12_11 ex12_12 ex12_13 ex12_14 ex12_15 \ | ||
ex12_16 ex12_17_18 ex12_22 ex12_23 ex12_24 ex12_26 ex12_28 ex12_32 ex12_33 | ||
OTHOBJS = ex12_20 ex12_27_30_TEST | ||
|
||
all:$(OBJECTS) $(OTHOBJS) | ||
|
||
# tells make to use the file "../GNU_makefile_template", which | ||
# defines general rules for making .o and .exe files | ||
include ../GNU_makefile_template | ||
|
||
ex12_20: ex12_20.o ex12_19.o | ||
$(CC) $(CCFLAGS) $(LOCFLAGS) ex12_20.o ex12_19.o \ | ||
-o $@ | ||
$(CC) $(CCFLAGS) $(LOCFLAGS) $^ -o $@ | ||
|
||
ex12_27_30_TEST: ex12_27_30_TEST.o ex12_27_30.o | ||
$(CC) $(CCFLAGS) $(LOCFLAGS) ex12_27_30_TEST.o ex12_27_30.o \ | ||
-o $@ | ||
$(CC) $(CCFLAGS) $(LOCFLAGS) $^ -o $@ | ||
|
||
# tells make to use the file "../GNU_makefile_template", which | ||
# defines general rules for making .o and .exe files | ||
include ../GNU_makefile_template |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,3 +59,9 @@ HasPtr::~HasPtr() | |
std::cout << "call destructor" << std::endl; | ||
delete ps; | ||
} | ||
|
||
int main() | ||
{ | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,16 @@ | ||
#cutable files for this directory | ||
OBJECTS = ex13_13 ex13_17 ex13_58 | ||
OTHOBJS = ex13_42 | ||
# ex13_48 : can not compile successfully! | ||
# ex13_28 ex13_26 ex13_18 ex13_34_36_37 ex13_44_47 ex13_53 : no main function! | ||
# ex13_42_StrVec ex13_49_Message ex13_49_String ex13_49_StrVec : no main function! | ||
# ex13_39 ex13_40 : no StrVec.h and correspending header file is useless! | ||
OBJECTS = ex13_13 ex13_17 ex13_58 \ | ||
ex13_28 ex13_26 ex13_18 ex13_34_36_37 ex13_39 ex13_40 ex13_44_47 ex13_53 | ||
OTHOBJS = ex13_42 ex13_48 | ||
# ex13_49_Message ex13_49_String ex13_49_StrVec | ||
all:$(OBJECTS) $(OTHOBJS) | ||
|
||
#list the header file after cpp file to show the dependency! | ||
ex13_18 : ex13_18.cpp ex13_18.h | ||
$(CC) $(CCFLAGS) $(LOCFLAGS) -o $@ $< | ||
|
||
ex13_26 : ex13_26.cpp ex13_26.h | ||
$(CC) $(CCFLAGS) $(LOCFLAGS) -o $@ $< | ||
|
||
ex13_28 : ex13_28.cpp ex13_28.h | ||
$(CC) $(CCFLAGS) $(LOCFLAGS) -o $@ $< | ||
|
||
ex13_34_36_37 : ex13_34_36_37.cpp ex13_34_36_37.h | ||
$(CC) $(CCFLAGS) $(LOCFLAGS) -o $@ $< | ||
|
||
ex13_39 : ex13_39.cpp ex13_39.h | ||
$(CC) $(CCFLAGS) $(LOCFLAGS) -o $@ $< | ||
|
||
ex13_40 : ex13_40.cpp ex13_40.h | ||
$(CC) $(CCFLAGS) $(LOCFLAGS) -o $@ $< | ||
|
||
ex13_42 : ex13_42.o ex13_42_TextQuery.o ex13_42_StrVec.o ex13_42_TextQuery.h ex13_42_StrVec.h | ||
$(CC) $(CCFLAGS) $(LOCFLAGS) -o $@ $^ | ||
|
||
ex13_44_47 : ex13_44_47.cpp ex13_44_47.h | ||
ex13_48 : ex13_44_47.cpp ex13_44_47.h | ||
$(CC) $(CCFLAGS) $(LOCFLAGS) -o $@ $< | ||
|
||
ex13_48 : ex13_48.cpp ex13_44_47.h | ||
$(CC) $(CCFLAGS) $(LOCFLAGS) -o $@ $< | ||
|
||
ex13_53 : ex13_53.cpp ex13_53.h | ||
$(CC) $(CCFLAGS) $(LOCFLAGS) -o $@ $< | ||
# tells make to use the file "../GNU_makefile_template", which | ||
# defines general rules for making .o and files | ||
include ../GNU_makefile_template |