forked from marckhoury/mars
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (29 loc) · 958 Bytes
/
Makefile
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
OS = $(shell uname -s)
ifeq ($(OS),Darwin)
CC = clang
LIBS = -lcgraph -llapack -lcdt libsfdp.a -framework GLUT -framework OpenGL -framework Cocoa
else
CC = gcc
LIBS = -lcgraph -llapack -lcdt libsfdp.a -lGL -lglut -lGLU
endif
CFLAGS = -O2
OBJECTS = dijkstra.o graph.o layout.o linalg.o marsopts.o glcontext.o marsviewer.o
TARGET = mars
mars: $(OBJECTS)
$(CC) $(CFLAGS) -o $(TARGET) marsmain.c $(OBJECTS) $(LIBS) $(LDFLAGS)
dijkstra.o: dijkstra.h dijkstra.c
$(CC) $(CFLAGS) -c dijkstra.c
graph.o: graph.h graph.c
$(CC) $(CFLAGS) -c graph.c
layout.o: layout.h layout.c
$(CC) $(CFLAGS) -c layout.c
linalg.o: linalg.h linalg.c
$(CC) $(CFLAGS) -c linalg.c
marsopts.o: marsopts.h marsopts.c
$(CC) $(CFLAGS) -c marsopts.c
glcontext.o: glcontext.h glcontext.c
$(CC) $(CFLAGS) -c glcontext.c
marsviewer.o: marsviewer.h marsviewer.c
$(CC) $(CFLAGS) -Wno-deprecated-declarations -c marsviewer.c
clean:
rm -f $(TARGET) $(OBJECTS) *~