Chris' Makefile Tutorial

Size: px
Start display at page:

Download "Chris' Makefile Tutorial"

Transcription

1 Chris' Makefile Tutorial Chris Serson University of Victoria June 26, 2007 Contents: Chapter Page Introduction 2 1 The most basic of Makefiles 3 2 Syntax so far 5 3 Making Makefiles Modular 7 4 Multi-file projects 11 5 Some more tidbits 13 Conclusion 16

2 2 Introduction: The purpose of this tutorial is to introduce new students to the wonders and terrors of Makefiles. When I was first introduced to these things, I didn't have a clue what was going on. I'd have to look over my friend's shoulder and copy his Makefile or copy and paste an old Makefile and hope I could just tweak it to run with my latest project. Even in 4th year, I had trouble with these things and I was always embarrassed to ask for help seeing as it is something I should have learned early on in my career as a student. My hope is that this tutorial will keep other students from suffering my fate. The idea behind having a Makefile is that you can save yourself a lot of typing of compiler commands. Rather than typing some crazy long string of flags and files, just type 'make' or 'make projectname' and away it goes.

3 3 Chapter 1 - The most basic of Makefiles: The most basic of Makefiles is basically just a file that runs the same command you would normally type into the command line. For instance, you may type: > gcc -o myprog myfile.c which would run off and compile myfile.c to an executable called myprog. Instead of this, you could put that line in a Makefile (the name of the file is exactly that, 'Makefile' no extension) and then run: > make for the exact same effect. More useful still is the fact that you can create a Makefile with multiple targets: project1: myfile1.c gcc -o project1 myfile1.c project2: myfile2.c gcc -o project2 myfile2.c With this file, if you type: > make it will run the first compile command. But if you type: > make project2 it will run the compile command under the 'project2:' heading. Even better, lets add another target to our Makefile:... clean: rm -f *.o project1 project2 Now if you type: > make clean it will delete all compiled files, giving you a clean workspace to recompile your source code from scratch. As a note, in case you didn't already know, '.o' files are 'object' files which contain compiled code which has yet to be linked together. We'll see this again in Chapter 4. Lets add another useful target:

4 4 all: project1 project2... If you add this line to the very top of your Makefile, now when you type: > make it will run your 'all:' target, which points to both of your 'project_' targets. Of course, you could add the 'all:' target anywhere in the file and you could compile all of your targets by typing: > make all but having it as the first target makes a certain amount of sense. Another option is to create a 'default:' target at the top of the file which you could leave empty if you wanted the default action to do nothing. default:... In this case: > make would do nothing.

5 5 Chapter 2 - Syntax so far: Up to now, we've done some things which may not yet be clear; so let's try to fix that by defining some basic syntax of a Makefile. A 'target' is the word listed before the colon. For instance, the statement 'project1:' is defining a target called 'project1'. As we've seen, you can call a target using: > make target which will run the compile command the target specifies. In a number of cases, there will be a list of files to the right of the target declaration. project1: myfile1.c myfile1.h myfile2.h This is the list of files the target needs - its dependencies. In the case of 'project1', we need the file 'myfile1.c' to compile. Note the space between the target and the dependencies. I think it is a good idea to put a 'tab' character in for that space. This is a good rule of thumb to use because the very next line MUST be indented with a 'tab' character. This next line is the actual command that gets run. project1: myfile1.c gcc -o project1 myfile1.c Something to remember here is that if 'myfile1.c' includes another file, that file will be compiled automatically using the above statement. However, you can use the list of dependencies as a guide to help you remember what files are needed for what, so adding those files to the list is a good thing. project1: myfile1.c extra.h myfile2.c gcc -o project1 myfile1.c

6 6 Assuming 'myfile1.c' includes both 'extra.h' and 'myfile2.c', the above lines will do the same thing as the previous incarnation but gives you more information about the structure of the project. Comments can be added to a Makefile by using the '#' character. For example: # this is a comment

7 7 Chapter 3 - Making Makefiles Modular: Here's where things start to get more complicated. I'm going to introduce a bunch of short-cuts to let you make more modular Makefiles. By this I mean that you should be able to create Makefiles that can be copied and pasted into different projects and be able to modify them quickly and easily without having to dig through the actual guts of the Makefile. The first of these short-cuts is the macro. If you can program enough code that you would even consider needing a Makefile, you've probably run across constants before. Macros in a Makefile are basically the same thing as constants but with slightly different syntax. Once a macro has been declared, you can use if whereever you could normally use the value it contains. For example: # the constant CC=gcc # this defines a macro CC which stands for the # compiler we will be using for our code. project1: myfile1.c $(CC) -o project1 myfile1.c

8 8 Notice how the macro is declared and then called. To declare a macro, simple write 'macroname=value'. Most people seem to leave out white space, but it will be just as correct to leave spaces in (ie, 'macroname = value'). Here's another example: CC=gcc # use the macro to name a target EXE=project1 # then use that macro to add the target to a list of # targets TARGETS=$(EXE) project2 # let's use the macro to declare the target now $(EXE): myfile1.c $(CC) -o myfile1.c... # let's use our TARGETS macro to list all of the possible # executable files we may have created. # this will delete 'project1' and 'project2' clean: rm -f *.o $(TARGETS)

9 9 Another example of a macro would be to create one called 'CFLAGS', or some such, and use it to define compiler flags you call quite often. For instance, your executables may always need the '-Wall' flag (this just changes setting relating to warning messages): CC=gcc CFLAGS=-Wall project1: myfile1.c $(CC) $(CFLAGS) project1 myfile1.c On to the next thing. There are a number of built in macros which can simplify the copy-and-paste method of making a Makefile: $@ -> this will copy the current target name. $< -> this will copy the FIRST file name in the dependency list. $^ -> this will copy ALL of the file names in the dependency list. There are also other built-in macros, but these are the three I actually find useful at this level. Here's an example: CC=gcc # example 1: project1: myfile1.c extra.h $(CC) -o project1 myfile1.c # same as project1: myfile1.c extra.h $(CC) -o $@ $^ # or project1: myfile1.c extra.h $(CC) -o $@ $<

10 # example 2: # this will not work. It will give a whole bunch of errors # since it tries to compile both files and myfile1.c already # includes myfile2.c. We effectively get a redefinition of # everything in myfile2.c. Note: it is possible to write # your code so this error won't actually happen and this # line will work. project1: myfile1.c myfile2.c $(CC) -o $@ $^ # this will work. It only takes the first file and compiles # it, linking in the other file automatically as appropriate. project1: myfile1.c myfile2.c $(CC) -o $@ $< 10

11 11 Chapter 4 - Multi-file projects: Now that we have a grasp of all kinds of different crazy things to help make our Makefile more useful and reusable, we need to go that extra step and talk about multi-file projects. By this, I mean projects that include a number of different '.c' and '.h' files. We've already seen a couple of examples in the previous chapters that included multiple files and worked just fine; however, to continue on the thought of making these Makefiles more modular, we're going to look at a more stuctured method. Let's look at a more complex project: ->main.c // includes queue.h ->list.h ->list.c // includes list.h ->queue.h // includes list.h ->queue.c // includes queue.h The simple approach to compiling this: CC=gcc project: main.c queue.h queue.c list.h list.c $(CC) -o $@ $^ This will work just fine, but what an evil list of file dependencies. Let's try something different: CC=gcc project: main.o queue.o list.o $(CC) -o $@ $^ main.o: main.c queue.h $(CC) -c $^ queue.o: queue.h queue.c list.h $(CC) -c $^ list.o: list.h list.c $(CC) -c $^ This style of Makefile shows the structure of the code much better than the previous way. You can see that the list code and queue code are strictly separate from the main

12 12 program, but you can also see where one section of code is dependant on another. If you wanted, you could remove the 'queue.h' from 'main.o' and 'list.h' from 'queue.o' and it would make no difference; however it would not be as clear the link between each code set. So what exactly is going on? How does this work? What are those '.o' files? Basically, we've split the program up into a bunch of pieces called object files (the '.o' files). These files make up the entirety of the program but they don't actually do anything on their own because they are not complete programs. They depend on the other files to work. So now what we have to do is link them together. That's what happens when we make the 'project' target. When you make the 'project' it runs make on each of the '.o' file targets. If those '.o' files don't exist or are not up-to-date, they are recompiled and then linked together as a final step.

13 13 Chapter 5 - Some more tid-bits: You should now have enough knowledge to pump out Makefiles for your standard, every day project. This chapter is dedicated to stuff that you may or may not find useful. These are things that I thought are pretty nifty. Splitting long lines up If you happen to have a line of text in your Makefile that is way to long to fit the average line width without scrolling, use the backslash character to split the line. This tells the make program that the line is continued on the next line. Example:... bigproject: main.o queue.o stack.o list.o recursive.o \ fileio.o database.o network.o... Multi-folder projects Let's say you have a big project and you want to keep your headers in one folder (/headers) and your source (/source) in another; and maybe your object files (the '.o's) should be in their own folder as well (/obj). No problem. Just make sure your includes are correct in your code and add another macro: HDIR=headers SDIR=source ODIR=obj project: $(ODIR)/main.o $(ODIR)/queue.o $(ODIR)/list.o $(CC) -o $@ $^ $(ODIR)/main.o: $(SDIR)/main.c $(HDIR)/queue.h $(CC) -c $^ $(ODIR)/queue.o: $(HDIR)/queue.h $(SDIR)/queue.c \ $(HDIR)/list.h $(CC) -c $^

14 14 $(ODIR)/list.o: $(HDIR)/list.h $(SDIR)/list.c $(CC) -c $^ Condensing your targets You may find all those '.o' targets really annoying. We can get rid of them, but we'll lose a lot of readability. You can do this using the '%' character as below: project: main.o queue.o list.o $(CC) -o $@ $^ %.o: %.c $(CC) -c $^ What this does is say that every.o file is compiled from a.c file of the same name. The COMPILEOBJ macro I thought this little macro would be handy for replacing all of those nasty strings of characters you get with every object target. Mind you, this isn't really as useful if you're using the previous tid-bit; however, it does still move all of the things you're likely to change to the top of the file. This is a good technique since you don't want to go digging through the file every time you make a change. You can make a COMPILEEXE macro in the same manner: CC=gcc COMPILEOBJ=$(CC) -c $^ CREATEEXE=$(CC) -o $@ $^ project: main.o queue.o list.o $(CREATEEXE) %.o: %.c $(CREATEOBJ)

15 15 The OBJS macro This one is probably pretty obvious, but I'll mention it anyway. Rather than writing all of the object files directly in the main project's dependency list, build another macro at the top of the file: CC=gcc COMPILEOBJ=$(CC) -c $^ CREATEEXE=$(CC) -o $^ OBJS=main.o queue.o list.o project: $(OBJS) $(CREATEEXE) %.o: %.c $(CREATEOBJ) LFLAGS vs CFLAGS We've seen the CFLAGS macro used before to define the flags used in relation to the compiler. But if you've noticed, we use different flags to compile the object files than we do to link them together. You may also want to consider a DEBUG macro that contains flags relating to any debugging you are doing: CC=gcc DEBUG=-g # as an example. You can look up what this does CFLAGS=-Wall -c $(DEBUG) LFLAGS=-Wall $(DEBUG) -o # the -o doesn't actually do # anything # other than rename the executable # and could be left out of LFLAGS but # I've added it in to illustrate my # point. COMPILEOBJ=$(CC) $(CFLAGS) $^ CREATEEXE=$(CC) $(LFLAGS) $@ $^ OBJS=main.o queue.o list.o project: $(OBJS) $(CREATEEXE) %.o: %.c $(CREATEOBJ)

16 16 Conclusion: So by now you should have a fair understanding of how a Makefile works. I've tried to simplify things and give lots of examples while still giving you a lot to work with. I hope I've succeeded, but if I haven't then below are a few websites which I used as references. Also, a websearch for "Makefile Tutorial" will turn up lots of helpful information

Linked Lists. What is a Linked List?

Linked Lists. What is a Linked List? Linked Lists Along with arrays, linked lists form the basis for pretty much every other data stucture out there. This makes learning and understand linked lists very important. They are also usually the

More information

Make: a build automation tool

Make: a build automation tool Make: a build automation tool What is the problem? The lab examples repository for the CS 253 course has 228 files in 54 folders. To build them all would requires us to navigate to 54 folders and compile

More information

The make utility. Alark Joshi COMPSCI 253

The make utility. Alark Joshi COMPSCI 253 The make utility Alark Joshi COMPSCI 253 What is make? Make is a utility that is included with Linux/Unix operating systems It is a command generator It is designed to help you compile large projects It

More information

The makeutility automatically determines which pieces of a large program need to be recompiled, and issues commands to recompile them.

The makeutility automatically determines which pieces of a large program need to be recompiled, and issues commands to recompile them. What is make? 1 make is a system utility for managing the build process (compilation/linking/etc). There are various versions of make; these notes discuss the GNU makeutility included on Linux systems.

More information

The Stack, Free Store, and Global Namespace

The Stack, Free Store, and Global Namespace Pointers This tutorial is my attempt at clarifying pointers for anyone still confused about them. Pointers are notoriously hard to grasp, so I thought I'd take a shot at explaining them. The more information

More information

Make: a build automation tool 1/23

Make: a build automation tool 1/23 Make: a build automation tool 1/23 What is the problem? The lab examples repository for the CS 253 course has 293 files in 81 folders. To build them all would requires us to navigate to 81 folders and

More information

Reviewing gcc, make, gdb, and Linux Editors 1

Reviewing gcc, make, gdb, and Linux Editors 1 Reviewing gcc, make, gdb, and Linux Editors 1 Colin Gordon csgordon@cs.washington.edu University of Washington CSE333 Section 1, 3/31/11 1 Lots of material borrowed from 351/303 slides Colin Gordon (University

More information

Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5

Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5 Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5 [talking head] This lecture we study theory design and implementation. Programmers have two roles to play here. In one role, they

More information

How to Improve Your Campaign Conversion Rates

How to Improve Your  Campaign Conversion Rates How to Improve Your Email Campaign Conversion Rates Chris Williams Author of 7 Figure Business Models How to Exponentially Increase Conversion Rates I'm going to teach you my system for optimizing an email

More information

BEGINNER PHP Table of Contents

BEGINNER PHP Table of Contents Table of Contents 4 5 6 7 8 9 0 Introduction Getting Setup Your first PHP webpage Working with text Talking to the user Comparison & If statements If & Else Cleaning up the game Remembering values Finishing

More information

Arduino IDE Friday, 26 October 2018

Arduino IDE Friday, 26 October 2018 Arduino IDE Friday, 26 October 2018 12:38 PM Looking Under The Hood Of The Arduino IDE FIND THE ARDUINO IDE DOWNLOAD First, jump on the internet with your favorite browser, and navigate to www.arduino.cc.

More information

Multiple file project management & Makefile

Multiple file project management & Makefile Multiple file project management & Makefile Compilation & linkage read.c read.h main.c Compilation: gcc -c read.c main.c list.c list.h list.c read.o main.o list.o Linkage: gcc... read.o main.o list.o -o

More information

PROFESSOR: Last time, we took a look at an explicit control evaluator for Lisp, and that bridged the gap between

PROFESSOR: Last time, we took a look at an explicit control evaluator for Lisp, and that bridged the gap between MITOCW Lecture 10A [MUSIC PLAYING] PROFESSOR: Last time, we took a look at an explicit control evaluator for Lisp, and that bridged the gap between all these high-level languages like Lisp and the query

More information

Learning Objectives. A Meta Comment. Exercise 1. Contents. From CS61Wiki

Learning Objectives. A Meta Comment. Exercise 1. Contents. From CS61Wiki From CS61Wiki Contents 1 Learning Objectives 2 A Meta Comment 3 Exercise 1 3.1 Questions 3.2 Running code and using GDB 3.3 Compiler Optimizations 3.4 hexdump: a handy function 3.4.1 Questions 3.5 Checkpoint

More information

Makefiles SE 2XA3. Term I, 2018/19

Makefiles SE 2XA3. Term I, 2018/19 Makefiles SE 2XA3 Term I, 2018/19 Outline Example Calling make Syntax How it works Macros Suffix rules Command line options Example Assume we have files main.c, test.c, and lo.asm Consider the makefile

More information

The name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet.

The name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet. Mr G s Java Jive #2: Yo! Our First Program With this handout you ll write your first program, which we ll call Yo. Programs, Classes, and Objects, Oh My! People regularly refer to Java as a language that

More information

CS Students Linux User's Guide

CS Students Linux User's Guide CS Students Linux User's Guide Writing a Makefile Author: Jaco Kroon (jaco@kroon.co.za) Version: 1.0 Last modified: Mon Aug 11 13:27:34 SAST 2003 Table of Contents 4.2 Writing a Makefile 4.2.1 Why Use

More information

C / C++ Coding Rules

C / C++ Coding Rules C / C++ Coding Rules Luca Abeni luca.abeni@unitn.it March 3, 2008 Abstract This short document collects some simple and stupid coding rules for writing understandable C or C++ code, and has been written

More information

The make utility automatically determines which pieces of a large program need to be recompiled, and issues commands to recompile them.

The make utility automatically determines which pieces of a large program need to be recompiled, and issues commands to recompile them. What is make? 1 make is a system utility for managing the build process (compilation/linking/etc). There are various versions of make; these notes discuss the GNU make utility included on Linux systems.

More information

Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5

Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5 Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5 [talking head] Formal Methods of Software Engineering means the use of mathematics as an aid to writing programs. Before we can

More information

Starting to Program in C++ (Basics & I/O)

Starting to Program in C++ (Basics & I/O) Copyright by Bruce A. Draper. 2017, All Rights Reserved. Starting to Program in C++ (Basics & I/O) On Tuesday of this week, we started learning C++ by example. We gave you both the Complex class code and

More information

Intermediate Programming, Spring 2017*

Intermediate Programming, Spring 2017* 600.120 Intermediate Programming, Spring 2017* Misha Kazhdan *Much of the code in these examples is not commented because it would otherwise not fit on the slides. This is bad coding practice in general

More information

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology.

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology. Guide to and Hi everybody! In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology. This guide focuses on two of those symbols: and. These symbols represent concepts

More information

CSE 374 Programming Concepts & Tools

CSE 374 Programming Concepts & Tools CSE 374 Programming Concepts & Tools Hal Perkins Fall 2017 Lecture 14 Makefiles and Compilation Management 1 Where we are Onto tools... Basics of make, particular the concepts Some fancier make features

More information

Slide 1 CS 170 Java Programming 1 Testing Karel

Slide 1 CS 170 Java Programming 1 Testing Karel CS 170 Java Programming 1 Testing Karel Introducing Unit Tests to Karel's World Slide 1 CS 170 Java Programming 1 Testing Karel Hi Everybody. This is the CS 170, Java Programming 1 lecture, Testing Karel.

More information

PROFESSOR: Well, now that we've given you some power to make independent local state and to model objects,

PROFESSOR: Well, now that we've given you some power to make independent local state and to model objects, MITOCW Lecture 5B PROFESSOR: Well, now that we've given you some power to make independent local state and to model objects, I thought we'd do a bit of programming of a very complicated kind, just to illustrate

More information

printf( Please enter another number: ); scanf( %d, &num2);

printf( Please enter another number: ); scanf( %d, &num2); CIT 593 Intro to Computer Systems Lecture #13 (11/1/12) Now that we've looked at how an assembly language program runs on a computer, we're ready to move up a level and start working with more powerful

More information

Copyright. For more information, please read the Disclosures and Disclaimers section at the end of this ebook. First PDF Edition, February 2013

Copyright. For more information, please read the Disclosures and Disclaimers section at the end of this ebook. First PDF Edition, February 2013 Copyright This ebook is Copyright 2013 Teresa Miller (the Author ). All Rights Reserved. Published in the United States of America. The legal notices, disclosures, and disclaimers in the front and back

More information

MITOCW watch?v=9h6muyzjms0

MITOCW watch?v=9h6muyzjms0 MITOCW watch?v=9h6muyzjms0 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To

More information

Basic Fiction Formatting for Smashwords in OpenOffice L. Leona Davis. Copyright 2012 L. Leona Davis All Rights Reserved

Basic Fiction Formatting for Smashwords in OpenOffice L. Leona Davis. Copyright 2012 L. Leona Davis All Rights Reserved Basic Fiction Formatting for Smashwords in OpenOffice L. Leona Davis Copyright 2012 L. Leona Davis All Rights Reserved Cover Photo by Dmitry Maslov Cover Design by L. Leona Davis Smashwords Edition June

More information

contain a geometry package, and so on). All Java classes should belong to a package, and you specify that package by typing:

contain a geometry package, and so on). All Java classes should belong to a package, and you specify that package by typing: Introduction to Java Welcome to the second CS15 lab! By now we've gone over objects, modeling, properties, attributes, and how to put all of these things together into Java classes. It's perfectly okay

More information

The Definitive Guide to Fractal Awesomeness with J-WildFire!

The Definitive Guide to Fractal Awesomeness with J-WildFire! Installing Java and J-WildFire - by Martin Flink Copyright 2013 Martin Flink All Rights Reserved. No part of this document may be reproduced in any form without permission in writing from the author. Contact:

More information

Troubleshooting Maple Worksheets: Common Problems

Troubleshooting Maple Worksheets: Common Problems Troubleshooting Maple Worksheets: Common Problems So you've seen plenty of worksheets that work just fine, but that doesn't always help you much when your worksheet isn't doing what you want it to. This

More information

Clickteam Fusion 2.5 Creating a Debug System - Guide

Clickteam Fusion 2.5 Creating a Debug System - Guide INTRODUCTION In this guide, we will look at how to create your own 'debug' system in Fusion 2.5. Sometimes when you're developing and testing a game, you want to see some of the real-time values of certain

More information

MITOCW watch?v=se4p7ivcune

MITOCW watch?v=se4p7ivcune MITOCW watch?v=se4p7ivcune The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To

More information

MITOCW watch?v=kz7jjltq9r4

MITOCW watch?v=kz7jjltq9r4 MITOCW watch?v=kz7jjltq9r4 PROFESSOR: We're going to look at the most fundamental of all mathematical data types, namely sets, and let's begin with the definitions. So informally, a set is a collection

More information

INTERMEDIATE SOFTWARE DESIGN SPRING 2011 ACCESS SPECIFIER: SOURCE FILE

INTERMEDIATE SOFTWARE DESIGN SPRING 2011 ACCESS SPECIFIER: SOURCE FILE HEADER FILE A header (.h,.hpp,...) file contains Class definitions ( class X {... }; ) Inline function definitions ( inline int get_x() {... } ) Function declarations ( void help(); ) Object declarations

More information

The Make Utility. Independent compilation. Large programs are difficult to maintain. Problem solved by breaking the program into separate files

The Make Utility. Independent compilation. Large programs are difficult to maintain. Problem solved by breaking the program into separate files The Make Utility Independent compilation Large programs are difficult to maintain Problem solved by breaking the program into separate files Different functions placed in different files The main function

More information

Physics REU Unix Tutorial

Physics REU Unix Tutorial Physics REU Unix Tutorial What is unix? Unix is an operating system. In simple terms, its the set of programs that makes a computer work. It can be broken down into three parts. (1) kernel: The component

More information

FileWave 10 Webinar Q&A

FileWave 10 Webinar Q&A FileWave 10 Webinar Q&A When will 10 be released? October 14 th, but you can sign up today to get into the beta program. Link: www.filewave.com/beta-program How stable is the beta? Should we use it for

More information

A PROGRAM IS A SEQUENCE of instructions that a computer can execute to

A PROGRAM IS A SEQUENCE of instructions that a computer can execute to A PROGRAM IS A SEQUENCE of instructions that a computer can execute to perform some task. A simple enough idea, but for the computer to make any use of the instructions, they must be written in a form

More information

DOWNLOAD PDF EXCEL MACRO TO PRINT WORKSHEET TO

DOWNLOAD PDF EXCEL MACRO TO PRINT WORKSHEET TO Chapter 1 : All about printing sheets, workbook, charts etc. from Excel VBA - blog.quintoapp.com Hello Friends, Hope you are doing well!! Thought of sharing a small VBA code to help you writing a code

More information

Writing to and reading from files

Writing to and reading from files Writing to and reading from files printf() and scanf() are actually short-hand versions of more comprehensive functions, fprintf() and fscanf(). The difference is that fprintf() includes a file pointer

More information

CS Basics 15) Compiling a C prog.

CS Basics 15) Compiling a C prog. CS Basics 15) Compiling a C prog. Emmanuel Benoist Fall Term 2016-17 Berner Fachhochschule Haute cole spcialise bernoise Berne University of Applied Sciences 1 Compiling a C program Example of a small

More information

Berner Fachhochschule Haute cole spcialise bernoise Berne University of Applied Sciences 2

Berner Fachhochschule Haute cole spcialise bernoise Berne University of Applied Sciences 2 Compiling a C program CS Basics 15) Compiling a C prog. Emmanuel Benoist Fall Term 2016-17 Example of a small program Makefile Define Variables Compilation options Conclusion Berner Fachhochschule Haute

More information

In today s video I'm going show you how you can set up your own online business using marketing and affiliate marketing.

In today s video I'm going show you how you can set up your own online business using  marketing and affiliate marketing. Hey guys, Diggy here with a summary of part two of the four part free video series. If you haven't watched the first video yet, please do so (https://sixfigureinc.com/intro), before continuing with this

More information

1 Getting used to Python

1 Getting used to Python 1 Getting used to Python We assume you know how to program in some language, but are new to Python. We'll use Java as an informal running comparative example. Here are what we think are the most important

More information

COMP Lecture Notes The Compiler

COMP Lecture Notes The Compiler COMP 161 - Lecture Notes - 05 - The Compiler January 20, 2016 In these notes we talk about compiling our multi-file C++ program in order to check syntax errors, run unit-tests, or build the main executable.

More information

The Make Utility. Independent compilation. Large programs are difficult to maintain. Problem solved by breaking the program into separate files

The Make Utility. Independent compilation. Large programs are difficult to maintain. Problem solved by breaking the program into separate files The Make Utility Independent compilation Large programs are difficult to maintain Problem solved by breaking the program into separate files Different functions placed in different files The main function

More information

P1_L3 Operating Systems Security Page 1

P1_L3 Operating Systems Security Page 1 P1_L3 Operating Systems Security Page 1 that is done by the operating system. systems. The operating system plays a really critical role in protecting resources in a computer system. Resources such as

More information

Class #7 Guidebook Page Expansion. By Ryan Stevenson

Class #7 Guidebook Page Expansion. By Ryan Stevenson Class #7 Guidebook Page Expansion By Ryan Stevenson Table of Contents 1. Class Purpose 2. Expansion Overview 3. Structure Changes 4. Traffic Funnel 5. Page Updates 6. Advertising Updates 7. Prepare for

More information

Introduction to System Programming : makefile

Introduction to System Programming : makefile Introduction to System Programming : makefile Reference Documentation: http://www.gnu.org/software/make/manual/make.html Tutorials: http://www.cs.umd.edu/class/spring2002/cmsc214/tutorial/makefile.html

More information

AHHHHHHH!!!! NOT TESTING! Anything but testing! Beat me, whip me, send me to Detroit, but don t make me write tests!

AHHHHHHH!!!! NOT TESTING! Anything but testing! Beat me, whip me, send me to Detroit, but don t make me write tests! NAME DESCRIPTION Test::Tutorial - A tutorial about writing really basic tests AHHHHHHH!!!! NOT TESTING! Anything but testing! Beat me, whip me, send me to Detroit, but don t make me write tests! *sob*

More information

COMP2100/2500 Lecture 17: Shell Programming II

COMP2100/2500 Lecture 17: Shell Programming II [ANU] [DCS] [COMP2100/2500] [Description] [Schedule] [Lectures] [Labs] [Homework] [Assignments] [COMP2500] [Assessment] [PSP] [Java] [Reading] [Help] COMP2100/2500 Lecture 17: Shell Programming II Summary

More information

MITOCW ocw f99-lec07_300k

MITOCW ocw f99-lec07_300k MITOCW ocw-18.06-f99-lec07_300k OK, here's linear algebra lecture seven. I've been talking about vector spaces and specially the null space of a matrix and the column space of a matrix. What's in those

More information

Who am I? I m a python developer who has been working on OpenStack since I currently work for Aptira, who do OpenStack, SDN, and orchestration

Who am I? I m a python developer who has been working on OpenStack since I currently work for Aptira, who do OpenStack, SDN, and orchestration Who am I? I m a python developer who has been working on OpenStack since 2011. I currently work for Aptira, who do OpenStack, SDN, and orchestration consulting. I m here today to help you learn from my

More information

Hi everyone. I hope everyone had a good Fourth of July. Today we're going to be covering graph search. Now, whenever we bring up graph algorithms, we

Hi everyone. I hope everyone had a good Fourth of July. Today we're going to be covering graph search. Now, whenever we bring up graph algorithms, we Hi everyone. I hope everyone had a good Fourth of July. Today we're going to be covering graph search. Now, whenever we bring up graph algorithms, we have to talk about the way in which we represent the

More information

KMyMoney Transaction Matcher

KMyMoney Transaction Matcher KMyMoney Transaction Matcher Ace Jones Use Cases Case #1A: Matching hand-entered transactions manually I enter a transaction by hand, with payee, amount, date & category. I download

More information

Skill 1: Multiplying Polynomials

Skill 1: Multiplying Polynomials CS103 Spring 2018 Mathematical Prerequisites Although CS103 is primarily a math class, this course does not require any higher math as a prerequisite. The most advanced level of mathematics you'll need

More information

Beginners Guide to Apophysis Scripting

Beginners Guide to Apophysis Scripting Page 1 of 14 Beginners Guide to Apophysis Scripting I've seen a couple of Apophysis scripting resources before. Some seemed technical and geared towards people who knew how to program. Others were more

More information

CSCi 4061: Intro to Operating Systems Spring 2017 Instructor: Jon Weissman Assignment 1: Simple Make Due: Feb. 15, 11:55 pm

CSCi 4061: Intro to Operating Systems Spring 2017 Instructor: Jon Weissman Assignment 1: Simple Make Due: Feb. 15, 11:55 pm CSCi 4061: Intro to Operating Systems Spring 2017 Instructor: Jon Weissman Assignment 1: Simple Make Due: Feb. 15, 11:55 pm 1 Purpose Make is a useful utility which builds executable programs or libraries

More information

11.1 Modular Organization and makefiles.

11.1 Modular Organization and makefiles. Chapter 11: Modules and Makefiles 11.1 Modular Organization and makefiles. From the Fanny Farmer cookbook: Before beginning to mix, be sure that all ingredients and utensils are on hand. You can t bake

More information

QUICK EXCEL TUTORIAL. The Very Basics

QUICK EXCEL TUTORIAL. The Very Basics QUICK EXCEL TUTORIAL The Very Basics You Are Here. Titles & Column Headers Merging Cells Text Alignment When we work on spread sheets we often need to have a title and/or header clearly visible. Merge

More information

C++ Style Guide. 1.0 General. 2.0 Visual Layout. 3.0 Indentation and Whitespace

C++ Style Guide. 1.0 General. 2.0 Visual Layout. 3.0 Indentation and Whitespace C++ Style Guide 1.0 General The purpose of the style guide is not to restrict your programming, but rather to establish a consistent format for your programs. This will help you debug and maintain your

More information

RIS shading Series #2 Meet The Plugins

RIS shading Series #2 Meet The Plugins RIS shading Series #2 Meet The Plugins In this tutorial I will be going over what each type of plugin is, what their uses are, and the basic layout of each. By the end you should understand the three basic

More information

Makefile Tutorial. Eric S. Missimer. December 6, 2013

Makefile Tutorial. Eric S. Missimer. December 6, 2013 Makefile Tutorial Eric S. Missimer December 6, 2013 1 Basic Elements of a Makefile 1.1 Explicit Rules A the major part of a Makefile are the explicit rules (a.k.a. recipes) that make certain files. Below

More information

Part 1 Simple Arithmetic

Part 1 Simple Arithmetic California State University, Sacramento College of Engineering and Computer Science Computer Science 10A: Accelerated Introduction to Programming Logic Activity B Variables, Assignments, and More Computers

More information

Azon Master Class. By Ryan Stevenson Guidebook #5 WordPress Usage

Azon Master Class. By Ryan Stevenson   Guidebook #5 WordPress Usage Azon Master Class By Ryan Stevenson https://ryanstevensonplugins.com/ Guidebook #5 WordPress Usage Table of Contents 1. Widget Setup & Usage 2. WordPress Menu System 3. Categories, Posts & Tags 4. WordPress

More information

Eventually, you'll be returned to the AVD Manager. From there, you'll see your new device.

Eventually, you'll be returned to the AVD Manager. From there, you'll see your new device. Let's get started! Start Studio We might have a bit of work to do here Create new project Let's give it a useful name Note the traditional convention for company/package names We don't need C++ support

More information

Post Experiment Interview Questions

Post Experiment Interview Questions Post Experiment Interview Questions Questions about the Maximum Problem 1. What is this problem statement asking? 2. What is meant by positive integers? 3. What does it mean by the user entering valid

More information

Contents. What's New. Dropbox / OneDrive / Google drive Warning! A couple quick reminders:

Contents. What's New. Dropbox / OneDrive / Google drive Warning! A couple quick reminders: Campground Master Contents 1 Contents A couple quick reminders: Make Backups! It's so sad when we hear from someone whose computer has crashed and they have no backup of their data to restore from. It's

More information

CS11 Advanced C++ Fall Lecture 4

CS11 Advanced C++ Fall Lecture 4 CS11 Advanced C++ Fall 2006-2007 Lecture 4 Today s Topics Using make to automate build tasks Using doxygen to generate API docs Build-Automation Standard development cycle: Write more code Compile Test

More information

Hi everyone. Starting this week I'm going to make a couple tweaks to how section is run. The first thing is that I'm going to go over all the slides

Hi everyone. Starting this week I'm going to make a couple tweaks to how section is run. The first thing is that I'm going to go over all the slides Hi everyone. Starting this week I'm going to make a couple tweaks to how section is run. The first thing is that I'm going to go over all the slides for both problems first, and let you guys code them

More information

Compiling with Multiple Files The Importance of Debugging CS 16: Solving Problems with Computers I Lecture #7

Compiling with Multiple Files The Importance of Debugging CS 16: Solving Problems with Computers I Lecture #7 Compiling with Multiple Files The Importance of Debugging CS 16: Solving Problems with Computers I Lecture #7 Ziad Matni Dept. of Computer Science, UCSB Programming in Multiple Files The Magic of Makefiles!

More information

Lesson 3 Transcript: Part 1 of 2 - Tools & Scripting

Lesson 3 Transcript: Part 1 of 2 - Tools & Scripting Lesson 3 Transcript: Part 1 of 2 - Tools & Scripting Slide 1: Cover Welcome to lesson 3 of the db2 on Campus lecture series. Today we're going to talk about tools and scripting, and this is part 1 of 2

More information

Client Side JavaScript and AJAX

Client Side JavaScript and AJAX Client Side JavaScript and AJAX Client side javascript is JavaScript that runs in the browsers of people using your site. So far all the JavaScript code we've written runs on our node.js server. This is

More information

MITOCW watch?v=zm5mw5nkzjg

MITOCW watch?v=zm5mw5nkzjg MITOCW watch?v=zm5mw5nkzjg The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To

More information

"Missing log" in edit viewer, all media gone Posted by prodeuser - 17 Aug :14

Missing log in edit viewer, all media gone Posted by prodeuser - 17 Aug :14 "Missing log" in edit viewer, all media gone Posted by prodeuser - 17 Aug 2013 06:14 So, this has happened a couple of times now. I am a new Lightworks user and have been doing some testing. As I increase

More information

Molecular Statistics Exercise 1. As was shown to you this morning, the interactive python shell can add, subtract, multiply and divide numbers.

Molecular Statistics Exercise 1. As was shown to you this morning, the interactive python shell can add, subtract, multiply and divide numbers. Molecular Statistics Exercise 1 Introduction This is the first exercise in the course Molecular Statistics. The exercises in this course are split in two parts. The first part of each exercise is a general

More information

Projects and Make Files

Projects and Make Files Projects and Make Files Creating an executable file requires compiling the source code into an object* file (file.o) and then linking that file with (other files and) libraries to create the executable

More information

CS102: Standard I/O. %<flag(s)><width><precision><size>conversion-code

CS102: Standard I/O. %<flag(s)><width><precision><size>conversion-code CS102: Standard I/O Our next topic is standard input and standard output in C. The adjective "standard" when applied to "input" or "output" could be interpreted to mean "default". Typically, standard output

More information

Naming Things in Adafruit IO

Naming Things in Adafruit IO Naming Things in Adafruit IO Created by Adam Bachman Last updated on 2016-07-27 09:29:53 PM UTC Guide Contents Guide Contents Introduction The Two Feed Identifiers Name Key Aside: Naming things in MQTT

More information

Introduction to Unix

Introduction to Unix Introduction to Unix Part 1: Navigating directories First we download the directory called "Fisher" from Carmen. This directory contains a sample from the Fisher corpus. The Fisher corpus is a collection

More information

CAAM 420 Fall 2012 Lecture 15. Roman Schutski

CAAM 420 Fall 2012 Lecture 15. Roman Schutski CAAM 420 Fall 2012 Lecture 15 Roman Schutski December 2, 2012 Table of Contents 1 Using make. Structures. 3 1.1 Makefiles...................................... 3 1.1.1 Syntax...................................

More information

CheckBook Pro 2 Help

CheckBook Pro 2 Help Get started with CheckBook Pro 9 Introduction 9 Create your Accounts document 10 Name your first Account 11 Your Starting Balance 12 Currency 13 We're not done yet! 14 AutoCompletion 15 Descriptions 16

More information

MITOCW watch?v=4dj1oguwtem

MITOCW watch?v=4dj1oguwtem MITOCW watch?v=4dj1oguwtem PROFESSOR: So it's time to examine uncountable sets. And that's what we're going to do in this segment. So Cantor's question was, are all sets the same size? And he gives a definitive

More information

Rule 1-3: Use white space to break a function into paragraphs. Rule 1-5: Avoid very long statements. Use multiple shorter statements instead.

Rule 1-3: Use white space to break a function into paragraphs. Rule 1-5: Avoid very long statements. Use multiple shorter statements instead. Chapter 9: Rules Chapter 1:Style and Program Organization Rule 1-1: Organize programs for readability, just as you would expect an author to organize a book. Rule 1-2: Divide each module up into a public

More information

Week - 01 Lecture - 04 Downloading and installing Python

Week - 01 Lecture - 04 Downloading and installing Python Programming, Data Structures and Algorithms in Python Prof. Madhavan Mukund Department of Computer Science and Engineering Indian Institute of Technology, Madras Week - 01 Lecture - 04 Downloading and

More information

CSE 333 Interlude - make and build tools

CSE 333 Interlude - make and build tools CSE 333 Interlude - make and build tools Hal Perkins Paul G. Allen School of Computer Science & Engineering University of Washington make make is a classic program for controlling what gets (re)compiled

More information

CIT 590 Homework 5 HTML Resumes

CIT 590 Homework 5 HTML Resumes CIT 590 Homework 5 HTML Resumes Purposes of this assignment Reading from and writing to files Scraping information from a text file Basic HTML usage General problem specification A website is made up of

More information

Reversing. Time to get with the program

Reversing. Time to get with the program Reversing Time to get with the program This guide is a brief introduction to C, Assembly Language, and Python that will be helpful for solving Reversing challenges. Writing a C Program C is one of the

More information

notice the '' you must have those around character values, they are not needed for integers or decimals.

notice the '' you must have those around character values, they are not needed for integers or decimals. C programming for the complete newbie Hello there im Krisis you may have seen me on irc.hackersclub.com. Well I thought it was about time to write an article like everyone else. But unlike many others

More information

Blitz2D Newbies: Definitive Guide to Types by MutteringGoblin

Blitz2D Newbies: Definitive Guide to Types by MutteringGoblin Blitz2D Newbies: Definitive Guide to Types by MutteringGoblin Types are probably the hardest thing to understand about Blitz Basic. If you're using types for the first time, you've probably got an uneasy

More information

Download, Install and Use Winzip

Download, Install and Use Winzip Download, Install and Use Winzip Something that you are frequently asked to do (particularly if you are in one of my classes) is to either 'zip' or 'unzip' a file or folders. Invariably, when I ask people

More information

MITOCW watch?v=0jljzrnhwoi

MITOCW watch?v=0jljzrnhwoi MITOCW watch?v=0jljzrnhwoi The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To

More information

area.o perimeter.o formatting.o geometry.c gcc -o geometry area.o perimeter.o formatting.o geometry.c

area.o perimeter.o formatting.o geometry.c gcc -o geometry area.o perimeter.o formatting.o geometry.c Makefiles tutorial 1. What is a makefile? Make is a program that looks for a file called makefile or Makefile, within the makefile are variables and things called dependencies. There are many things you

More information

Understandable manual? Posted by Max Besser - 02 Feb :10

Understandable manual? Posted by Max Besser - 02 Feb :10 Understandable manual? Posted by Besser - 02 Feb 2011 17:10 www.lightworksbeta.com/index.php?option=com_kunena&func=view&catid=6&id=5100& amp;limit=6&limitstart=6&itemid=202#5167 Forum Admin wrote: @ Besser

More information

MITOCW watch?v=yarwp7tntl4

MITOCW watch?v=yarwp7tntl4 MITOCW watch?v=yarwp7tntl4 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality, educational resources for free.

More information

Matlab for FMRI Module 1: the basics Instructor: Luis Hernandez-Garcia

Matlab for FMRI Module 1: the basics Instructor: Luis Hernandez-Garcia Matlab for FMRI Module 1: the basics Instructor: Luis Hernandez-Garcia The goal for this tutorial is to make sure that you understand a few key concepts related to programming, and that you know the basics

More information

Lesson4:CreatinganInterfaceandChecklistService

Lesson4:CreatinganInterfaceandChecklistService Lesson4:CreatinganInterfaceandChecklistService We have the majority of our template for the application set up so far, but we are also going to need to handle the "logic" that happens in the application.

More information