-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (30 loc) · 995 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
41
# ******************************************************************\
# File: Makefile for rng
# Language: C++ (ISO 1998)
# Copyright: Jiheng Zhang
# Hong Kong University of Science and Technology
# Date: March 23, 2014
# ******************************************************************/
# This is the makefile for RNG (random number generator).
# set compiler
COMPILER = g++
FLAGS += -O2 -Wall -g -Wno-deprecated -D_CHECK_MEMORY
# set home
RNGHOME = .
INCLUDEDIR = $(RNGHOME)/include
LIBDIR = $(RNGHOME)/lib
SOURCEDIR = $(RNGHOME)/source
# test number
NU = test
# library objects
LIBOBJS = $(LIBDIR)/RngStream.o $(LIBDIR)/Rngs.o
# implicit rules
$(LIBDIR)/%.o : $(SOURCEDIR)/%.cpp
$(COMPILER) $(FLAGS) -I$(INCLUDEDIR) -c -o $@ $<
%.o : %.cpp
$(COMPILER) $(FLAGS) -I$(INCLUDEDIR) -c -o $@ $<
all: $(NU)
$(NU): $(NU).o $(LIBOBJS)
$(COMPILER) -g -o $(NU) $(NU).o $(LIBOBJS)
clean:
rm $(NU) *.o *~ $(LIBDIR)/*.o $(SOURCEDIR)/*~