
Untitled
By: a guest on
May 12th, 2012 | syntax:
None | size: 0.45 KB | hits: 14 | expires: Never
'make' does not recompile when source file has been edited
Cell grid[GRID_HEIGHT][GRID_WIDTH];
#define GRID_HEIGHT 10
#define GRID_WIDTH 10
CC = gcc
OBJECTS = main.o functions.o
Game of Life : $(OBJECTS)
$(CC) $(OBJECTS) -o Game of Life -lncurses
%.o : %.c
$(CC) -c $<
%.o : functions.h
%.o : %.c functions.h
$(CC) -c $< -o $@
CC = gcc
OBJECTS = main.o functions.o
%.o : %.c
$(CC) -MD -c $<
-include $(OBJECTS:.o=.d)