diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..02fb069 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +CC = gcc +CFLAGS = -Wall -pedantic -ansi +LDFLAGS = -lm +BIN = graph.exe +OBJ = errors.o lex.o main.o math_functions.o parser.o ps_graph.o tree.o + +%.o: %.c + $(CC) -c $(CFLAGS) $< -o $@ + +$(BIN): $(OBJ) + $(CC) $(LDFLAGS) $^ -o $@ + diff --git a/Makefile.win b/Makefile.win new file mode 100644 index 0000000..5ae7d9d --- /dev/null +++ b/Makefile.win @@ -0,0 +1,9 @@ +BIN = graph.exe +OBJ = errors.o lex.o main.o parser.o ps_graph.o tree.o + +.c.obj: + cl $< /c + +$(BIN): $(OBJ) + cl $(OBJ) /Fe$(BIN) +