1 Page

MakefilesHowto

Course: COMP 2710, Fall 2011
School: Auburn
Rating:
 
 
 
 
 

Word Count: 232

Document Preview

are Makefiles easy. Approach 1: In fact, to build a simple program that doesn't depend on any libraries, you don't even need a makefile. make(1) is smart enough to figure it all out itself. For instance, if you have a file "xzq0001_hw1.cpp" (Note: xzq0001 is my Auburn ID) in the current directory: $ ls xzq001_hw1.cpp $ make xzq0001_hw1 g++ xzq0001_hw1 -o xzq0001_hw1 make(1) will detect the type...

Register Now

Unformatted Document Excerpt

Coursehero >> Alabama >> Auburn >> COMP 2710

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
are Makefiles easy. Approach 1: In fact, to build a simple program that doesn't depend on any libraries, you don't even need a makefile. make(1) is smart enough to figure it all out itself. For instance, if you have a file "xzq0001_hw1.cpp" (Note: xzq0001 is my Auburn ID) in the current directory: $ ls xzq001_hw1.cpp $ make xzq0001_hw1 g++ xzq0001_hw1 -o xzq0001_hw1 make(1) will detect the type of file and compile it for you, automatically naming the executable the same as the input file (g++(1)) xzq0001_hw1.cpp will give you a file called a.out unless you manually specify a name for it). If you need libraries, you can specify them by setting the variable LDFLAGS on the command line. Approach 2: Of course, you also can prepare a simple makefile (available at: http://www.eng.auburn.edu/~xqin/courses/comp2710/makefile) as follows: xzq0001_hw1: xzq0001_hw1.cpp g++ xzq0001_hw1.cpp -o xzq0001_hw1 clean: rm -f *.o xzq0001_hw1 where xzq_0001 is my auburn ID. Suppose you have two files "xzq0001_hw1.cpp" and makefile in the current directory, then you will have: $ ls makefile xzq001_hw1.cpp $ make g++ xzq0001_hw1 -o xzq0001_hw1 make is smart enough to use the first rule in the Makefile as the default action, so: $ ls Makefile xzq0001_hw1 xzq0001_hw1.o References: http://wlug.org.nz/MakefileHowto
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Auburn - COMP - 2710
COMP 2710 SyllabusTerm: Fall 2011Course: COMP 2710: Software ConstructionSchedule: MWF, 8:00 8:50 am, in Shelby Center 1124Instructor: Dr. Xiao Qin (xqin@auburn.edu)Office: 3101E Shelby CenterOffice Phone: 334-844-6327Office Hours: MWF, 8:50 am 9:5
Auburn - COMP - 2710
UNIXThe BasicsSource:http:/cis.kutztown.edu/~kta/Projects/Unix.pptWhat is Unix?Unix is just an operating system. Itprovides the same functionality as theoperating systems we all know and love.What makes Unix slightly morechallenging, is its lack o
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureDay 1: Read Other PeoplesCodeDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101These slides are adapted from notes by Dr. Carlos Oliveirahttp:/coliveira.net/software/day-1-read-ot
Auburn - COMP - 3400
COMP4300 Computer ArchitectureFall 2010Auburn UniversityInstructor: Dr. Xiao QinStudy Guide for the Final ExamThe midterm exam will occur on Thursday, Dec. 9th. This exam is closed book and closednotes. The exam is worth 20% of your final grade. Alt
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureLab 1 Common ProblemsDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20081Bad Data Structures 1class Memorycfw_public:2string text[140];int t_index;int t_size;mem_word data[140
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureLaboratory Assignment 2:Single vs. Multi-cycle MachinesDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Introduction From your accumulator-based machine to aGeneral Purpose Regi
Auburn - COMP - 3400
Lab 3 How to implement the ID stage?Question: I would like to bring to your attention (if you are not already aware of it) a problemthat can arise with branching in the Decode stage, regarding forwarding: If a branch instruction'sinput depends on the o
Auburn - COMP - 3400
Lab 3 Fall10; Lec11b; 10/27/2010.How to implement the EXE stage in a 5-stage pipeline?How to deal with the forwarding issue?Questions:1. In which stage should we implement the forwarding mechanism?2. How to detect hazards in stage 3?Stage 3:Whats n
Auburn - COMP - 3400
Auburn - COMP - 3400
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureDay 4: Learn a NewProgramming LanguageDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101These slides are adapted from notes by Dr. Carlos Oliveirahttp:/coliveira.net/software/day-
Auburn - COMP - 3400
COMP 4300 ComputerArchitectureDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Outline2Course ObjectivesCourse Content & GradingLaboratory AssignmentsTechnology TrendsCOMP 4300: Semester CalendarSee the c
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureTechnology TrendDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Technology TrendIn reality:Big Fishes Eating Little Fishes2Technology Trend1988 Computer Food ChainCentralize
Auburn - COMP - 3400
COMP 4300 Computer ArchitecturePerformance MeasurementDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101What is Computer Architecture ?Application (Netscape)SoftwareHardwareOperating SystemCompiler(Unix;As
Auburn - COMP - 3400
COMP 4300 Computer ArchitecturePerformance MeasurementDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Example of Measuring CPU timeCPU timeCPU time= Seconds = Instructions x Cycles x Seconds= Seconds = Inst
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureInstruction SetDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101The Instruction Set (ISA):a Critical InterfaceTheactualprogrammervisibleinstructionsetsoftwareinstructionsethar
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureInstruction Set (cont.)Dr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Operand Locations in Four ISAClassesGPR2Code Sequence C = A + BCodefor Four Instruction SetsforStack
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureInstruction Set (cont.)Dr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Memory-Memory Architectures Instruction set:(3 operands) add A, B, C(2 operands) add A, Bsub A, B, Cmul
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureTypes of InstructionsDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Review: Types of Addressing ModesAddressing Mode1. Register direct2. Immediate3. Displacement4. Register
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureOperations in the Instruction SetDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Review Memory Addressing Types of Instructions2I-Format vs. R-FormatInstructions Compare wit
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureOperations in the Instruction SetDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Comparisons - What about <, <=, >,>=? bne, beq provide equality comparison slt provides magnitu
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureDatapathDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Datapath for BranchInstructionsbeq rs, rt, offsetif (R[rs] = R[rt]) thenPC PC+4 + s_extend(offset<2)oprsrtoffset/im
Auburn - COMP - 3400
COMP 4300 Computer Architecture1. Single-Cycle Datapath2. Control Unit DesignDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Datapath Components for MIPS beqbeq $R1, $R2, -100if $R1=$R2 then PC = PC+4+4*(-10
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureControl Unit StructureDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101ReviewADD04rsrtrdI[25:21] I[20:16] I[15:11]PC1<2InstructionADDRRDInstructionMemoryI325016
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureMulticycle ImplementationDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101The Problem with Single-CycleProcessor Implementation: Performance Performance is limited by the slowest
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureMulticycle ImplementationDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101The slowest instruction.If all instructions must complete within one clock cycle, then the cycle time has
Auburn - COMP - 3400
COMP 4300 Computer ArchitecturePipeline: IntroductionDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Full Multicycle ImplementationZ eroPCWrite CondControlUnitPCWrit eALUOp2ALUControlIRWritefunctop
Auburn - COMP - 3400
COMP 4300 Computer ArchitecturePipeline: SpeedupDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Pipeline example: lwWBCan you find a problem?2Basic Pipelined Processor (lw)3Single-Cycle vs. Pipelined Exec
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureStructural HazardsDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Review: Pipeline Hazards Limits to pipelining: Hazards prevent nextinstruction from executing during itsdesign
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureData HazardsControl HazardsDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Review: Structural Hazards Attempt to use same resource twice at sametime Example: Single Memory for
Auburn - COMP - 3400
COMP 4300 Computer ArchitecturePipeline: Branch PredictionDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Review: Data Hazards Data hazards occur when data isused before it is storedTime (in clock cycles)CC
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureReviewDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Supercomputer Trends in TopSIMDClusterSingle processor 500ConstellationsSMPMPPwww.top500.orgNov. 2004CPUCPUCPUCPU
Auburn - COMP - 3400
COMP 4300 Computer ArchitecturePipeline: ExceptionsDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Exceptions - Stuff Happens Exceptions definition: unexpectedchange in control flow Another form of control h
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureControl for Pipelined DatapathDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Pipelining in MIPS MIPS architecture was designed to bepipelined Simple instruction format (makes
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureInstruction-level parallelism:IntroductionDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Class ExerciseConsider the following code segment1.LW R1, 0(R4)2.LW R2, 0(R5)3.AD
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureLaboratory Assignment 3:Pipelined Datapath with Interlocksand ForwardingDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Introduction From your multi-cycle machine to amachine
Auburn - COMP - 3400
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureInstruction-level parallelism:Instruction DependenceDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101ILP Challenges How many instructions can we execute inparallel? Definition
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureControl DependenciesDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Instruction Dependence ExampleFor the following code identify all data and name dependencebetween instruction
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureReview: Control DependenciesDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Review: Preserving the data flow Consider the following example:daddu r1,r2,r3beqz r4,Ldsubu r1,r5,
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureScoreboardDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Typical Scoreboard Structure2 FP multiply, 1 FP adder, 1 FP divider, 1 integer2Using A Scoreboard: 4 stages1.Issue d
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureScoreboard An ExampleDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Scoreboard Example Cycle 1InstructionstatusInstructionjkLDF634+ R2LDF245+ R3MULTDF0F2F4SUBD F8
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureInstruction-level parallelism:TomasuloDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Review: Scoreboard Techniques to deal with data hazards in instructionpipelines by: Resul
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureInstruction-level parallelism:Tomasulo (cont.)Dr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Tomasulos Algorithm Tracks when operands for instructions areavailable. Minimizes
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureTomasulo - A loop exampleDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Tomasulo Loop ExampleLoop: LDMULTDSDSUBIBNEZF0F4F4R1R10R1F0 F20R1R1 #8Loop This time ass
Auburn - COMP - 3400
Memory Hierarchy: IntroductionDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Memory Systems - the BigPicture withMemory provides processor Instructions Data Problem: memory is too slow and too smallProces
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureSet-Associative CacheBlock IdentificationDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Direct-Mapped Cache with n one-wordblocks Pros: find data fast Con: What if access 000
Auburn - COMP - 3400
COMP 4300 Computer ArchitectureReview for Final ExamDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduFall, 20101Final Exam ReviewFocus on materials after the midterm,including Pipeline Exceptions Control for Pipelined
Auburn - COMP - 3400
COMP4300 Computer ArchitectureFall 2010Auburn UniversityInstructor: Dr. Xiao QinStudy Guide for MidtermThe midterm exam will occur on Friday, Oct. 8. This exam is closed book and closed notes. The examis worth 20% of your final grade. Although a cal
Auburn - COMP - 7370
Are Clouds Secure?Security and PrivacyImplications ofCloud ComputingSubra Kumaraswamy, SunTim Mather, RSA04/21/09 | Session ID: HOT-105Session Classification: IntermediateWhat Were Not Going to Discuss Existing aspects of information security whi
Auburn - COMP - 7370
CloudAV: N-Version Antivirus in the Network CloudJon Oberheide, Evan Cooke, Farnam JahanianElectrical Engineering and Computer Science DepartmentUniversity of Michigan, Ann Arbor, MI 48109cfw_jonojono, emcooke, farnam@umich.eduAbstractAntivirus soft
Auburn - COMP - 7370
LestWeRemember:ColdBootAttacksonLestWeRemember:ColdBootAttacksonEncryptionKeysJ.AlexHalderman,SethD.Schoen,NadiaHeninger,WilliamClarkson,WilliamPaul,JosephA.Calandrino,ArielJ.Feldman,JacobAppelbaum,andEdwardW.FeltenInProceedingsofthe2008USENIXSecurit
Auburn - COMP - 7370
Freenet: A Distributed Anonymous InformationStorage and Retrieval SystemIan Clarke1 , Oskar Sandberg2 , Brandon Wiley3 , and Theodore W. Hong414Uprizer, Inc., 1007 Montana Avenue #323, Santa Monica, CA 90403, USAian@octayne.com2Mrbydalen 12, 18252
Auburn - COMP - 7370
COMP 7370Advanced Computer and Network SecurityHomework 2 FeedbackDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduSpring, 201112Goals of Homework 2Homework 2 vs. Paper reviewingHomework 2 vs. Choosing a research probl
Auburn - COMP - 7370
COMP 7370Advanced Computer and Network SecurityHomework 3 FeedbackDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduSpring, 20111Goals of Homework 2/3 Paper reviewing Choosing a research problem2Good Organizations Jame
Auburn - COMP - 7370
L. Sweeney. k-anonymity: a model for protecting privacy. International Journal on Uncertainty,Fuzziness and Knowledge-based Systems, 10 (5), 2002; 557-570.k-ANONYMITY: A MODEL FOR PROTECTING PRIVACY1LATANYA SWEENEYSchool of Computer Science, Carnegie
Auburn - COMP - 7370
Generalizing Data to Provide Anonymity when Disclosing InformationExtended AbstractPierangela SamaratiComputer Science LaboratorySRI InternationalMenlo Park, CA 94025, USAsamarati@csl.sri.comLatanya SweeneyLaboratory for Computer ScienceMassachus
Auburn - COMP - 7370
COMP 7370Advanced Computer and Network SecurityDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduCOMP 7370, Auburn UniversitySlide 01-1Introduce YourselvesNameM.S. or Ph.D. studentYour research interestsYour ongoing res
Auburn - COMP - 7370
COMP7370 Advanced Computer and Network SecurityCold Boot Attacks on Encryption KeysA memory remanence attack aims to obtain memory images and recover cryptographickeys from DRAM after a reset or moving the DRAM to another system.1. Motivation: How to
Auburn - COMP - 7370
COMP 7370Advanced Computer and Network SecurityLec02aDRAM Remanence EffectsDr. Xiao QinAuburn Universityhttp:/www.eng.auburn.edu/~xqinxqin@auburn.eduSpring, 20111Decay at operating temperature2Decay at operating temperature3Decay at operatin
Auburn - COMP - 7370
COMP7370 Advanced Computer and Network SecurityCold Boot Attacks on Encryption Keys (2)Topics: Imaging Residual MemoryKey reconstructionIdentifying keys in memoryTopic 1: Imaging Residual Memory1. Memory Wiping Can wiping memory at POST (Power-On S