f34eab2af9ab273f8f14ab0a15e7d641c3971c66
[matches/honours.git] / course / semester2 / pprog / assignment1 / single-thread / Makefile
1 # Makefile for nbody program
2 # Compiles on Ubuntu 12.04 and Debian 6.0.4
3 # NOTE: This file is identical for both the single-threaded and multi-threaded versions of the program
4 CXX = gcc
5 LIBRARIES = -lm -lGL -lglut -lGLU -lpthread
6 FLAGS = --std=c99 -Wall -pedantic -g
7 PREPROCESSOR_FLAGS = -fopenmp
8 SINGLE_THREAD_OBJ = main.o nbody.o graphics.o
9 LINK_OBJ = main.o nbody.o graphics.o
10
11 BIN = nbody
12
13 $(BIN) : $(LINK_OBJ) 
14         $(CXX) -o $(BIN) $(LINK_OBJ) $(LIBRARIES)
15
16 nbody : 
17
18 %.o : %.c
19         $(CXX) $(FLAGS) $(PREPROCESSOR_FLAGS) -c $<
20
21 clean :
22         $(RM) $(BIN) $(OBJ) $(LINK_OBJ)
23
24 clean_full: #cleans up all backup files
25         $(RM) $(BIN) $(OBJ) $(LINK_OBJ)
26         $(RM) *.*~
27         $(RM) *~

UCC git Repository :: git.ucc.asn.au