makefile 1

This commit is contained in:
det-fys 2024-12-30 19:13:37 +01:00
parent 936c846b0c
commit c69def07a3
2 changed files with 21 additions and 0 deletions

12
Makefile Normal file
View File

@ -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 $@

9
Makefile.win Normal file
View File

@ -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)