CS 242 Spring 2012 : Basic Image Convolution Makefile Utility

This page last changed on Jan 12, 2012 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 Mar 29, 2012 02:55

  1. No comments yet.

  1. No trackbacks yet.