From c69def07a30a9f3b22fbd201905bf84becc11049 Mon Sep 17 00:00:00 2001 From: det-fys Date: Mon, 30 Dec 2024 19:13:37 +0100 Subject: [PATCH] makefile 1 --- Makefile | 12 ++++++++++++ Makefile.win | 9 +++++++++ 2 files changed, 21 insertions(+) create mode 100644 Makefile create mode 100644 Makefile.win 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) +