CS 242 Fall 2011 : Basic Image Convolution Makefile Utility

This page last changed on Aug 08, 2011 by conadmin.

Supposing you have three files BMPHeader.h, BMPHeader.c , main.c and a kernel file, kernel.xml.

You are to create a makefile which compiles your code taking in Kernel1.xml at the command prompt.

E.g.  Your Makefile will look like this:

KERNEL:= 

ImageConvolution: main.o BMPHeader.o

main.o: main.c

                           gcc -c main.c

BMPHeader.o: BMPHeader.c BMPHeader.h

                           gcc -c BMPHeader.c $KERNEL

At the command prompt you would say:

make KERNEL=kernel1.xml 

Document generated by Confluence on Feb 22, 2012 18:09

  1. No comments yet.

  1. No trackbacks yet.