





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






CMSC 212 โ F05 (lect 3)^1
CMSC 212 โ F05 (lect 3)^2
Adapted from: www.cs.tau.ac.il/~dcor/Software1/Makefile. ppt
CMSC 212 โ F05 (lect 3)^3
sum (executable)
main.c sum.h sum.c
main.o sum.o
CMSC 212 โ F05 (lect 3)^4
Notes About Makefiles:
Target Dependency list
Tab
Action
CMSC 212 โ F05 (lect 3)^7
CMSC 212 โ F05 (lect 3)^8
all: intCount table
clean: rm -f *.o *.bb *.bbg *.da *.png
intCount: intCount.o $(CC) -o intCount intCount.o
table: table.o main.o hashTable.o $(CC) -o table table.o main.o hashTable.o
table.o: table.c table.h hashTable.o: hashTable.c table.h main.o: main.c table.h intCount.o: table.h
CC = gcc CFLAGS = -g -Wall
Two top-level programs
Links together several files Uses Default Rule
Macro Definitions
Not part of main tree built by typing โmake cleanโ
CMSC 212 โ F05 (lect 3)^9
l Integer Family name minimum by ANSI standard ours
CMSC 212 โ F05 (lect 3)^10
#include int main(){ double a; double b; printf("size of a is %d and size of b = %d\n",sizeof(a), sizeof(b)); a = 5; b = &a; printf("a = %.2f and b indicates %.2f\n",a,b); a = 21; printf("a = %.2f and b indicates %.2f\n",a,b); return 0; }*
CMSC 212 โ F05 (lect 3)^13
CMSC 212 โ F05 (lect 3)^14
CMSC 212 โ F05 (lect 3)^15
CMSC 212 โ F05 (lect 3)^16