summaryrefslogtreecommitdiff
path: root/Makefile
blob: 68409542d8859a14b942b39c401ae6872af2f270 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#
# Makefile for mammoth
#
# Author:
# Dr. Ilhan Ozgen-Xian
# Lawrence Berkeley National Laboratory 2021
#
# Type "make" to compile mammoth
#


PRG=mammoth
SRC=main.c
HDR=header.h

CC=/usr/local/bin/gcc-11
CTAGS=uctags

TRIANGLE_DIR=/Users/IOzgen/Documents/work/coding/tools/triangle

CFLAGS=-g -Wall -Wextra -pedantic -std=c99
LFLAGS=-I$(TRIANGLE_DIR)
CPU=
RUNFLAGS=
INCLUDES=
LIB=$(TRIANGLE_DIR)/triangle.o

#
#
#

OBJ=$(SRC:.c=.o)

all: $(PRG)
	make tags

run: $(PRG)
	$(RUNFLAGS) ./$(PRG)

$(PRG): $(OBJ)
	$(CC) $(LFLAGS) $(CFLAGS) $(OBJ) -o $@ $(LIB)

%.o: %.c
	$(CC) $(LFLAGS) $(CFLAGS) -c $< -o $@

clean:
	rm -vf $(PRG) $(OBJ)
	rm -vf $(P)

cleanall:
	rm -vf output/*
	make clean

tags: $(SRC)
	$(CTAGS) -Re $(SRC) $(HDR)

.PHONY: all clean cleanall tags

# eof