Skip to content

Commit

Permalink
Updated makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristoffer Grönlund committed Sep 1, 2009
1 parent 316e21f commit bbb16a1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Makefile
@@ -1,7 +1,15 @@
CC=gcc
CFLAGS=-Wall -g
CFLAGS=-Wall -Werror -g -std=c99
DEPS = stream.h
OBJ = main.o stream.o

main: main.o stream.o
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)

main: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS)

.PHONY: clean

clean:
rm -f main *.o
rm -f main $(OBJ)
1 change: 1 addition & 0 deletions main.c
Expand Up @@ -15,6 +15,7 @@ struct interpreter {

int init_interpreter(struct interpreter* I) {
memset(I, 0, sizeof(struct interpreter));
return 0;
}

int main(int argc, char* argv[]) {
Expand Down

0 comments on commit bbb16a1

Please sign in to comment.