-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
57 lines (49 loc) · 2.1 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#-----------------------------------------------------------------------
# Preservation Virtual Machine Project
# File: Makefile
#
# Authors:
# Sergio Romero Montiel
# Eladio Gutierrez Carrasco
# Oscar Plata Gonzalez
#
# Created on May 2020
#-----------------------------------------------------------------------
#-----------------------FILES-------------------------------------------
EXEC_PREFIX :=ivm64-emu
EXEC_FAST :=$(EXEC_PREFIX)-no-io
EXEC_SEQ :=$(EXEC_PREFIX)
EXEC_PAR :=$(EXEC_PREFIX)-parallel
EXEC_HISTO :=$(EXEC_PREFIX)-histo
EXEC_TRACE2 :=$(EXEC_PREFIX)-trace2 #VERBOSE=2
EXEC_TRACE3 :=$(EXEC_PREFIX)-trace_compact #VERBOSE=3
EXEC_TRACE4 :=$(EXEC_PREFIX)-trace4 #VERBOSE=4
#-----------------------TOOLS-------------------------------------------
# Compiler
CC = gcc
# Compiler options
#CFLAGS = -Wall -Ofast -I.
#CFLAGS = -Ofast -I. -DSTEPCOUNT -DFPE_ENABLED
CFLAGS = -Ofast -I.
LDFLAGS = -static -lpng -lz -lm
# ----------------------RULES-------------------------------------------
# Targets y sufijos
.PHONY: all clean
#regla para hacer la libreria
all: $(EXEC_SEQ) $(EXEC_FAST) $(EXEC_PAR) $(EXEC_HISTO) $(EXEC_TRACE2) $(EXEC_TRACE3) $(EXEC_TRACE4)
$(EXEC_FAST): ivm_emu.c ivm_emu.h
$(CC) $(CFLAGS) $< -o $@ -DSTEPCOUNT
$(EXEC_SEQ): ivm_emu.c ivm_emu.h ivm_io.h
$(CC) $(CFLAGS) $< -o $@ -DWITH_IO -DSTEPCOUNT $(LDFLAGS)
$(EXEC_PAR): ivm_emu.c ivm_emu.h ivm_io.h
$(CC) $(CFLAGS) $< -o $@ -DWITH_IO -DSTEPCOUNT -DPARALLEL_OUTPUT $(LDFLAGS)
$(EXEC_HISTO): ivm_emu.c ivm_emu.h ivm_io.h
$(CC) $(CFLAGS) $< -o $@ -DWITH_IO -DSTEPCOUNT -DNOOPT -DVERBOSE=1 -DHISTOGRAM $(LDFLAGS)
$(EXEC_TRACE2): ivm_emu.c ivm_emu.h ivm_io.h
$(CC) $(CFLAGS) $< -o $@ -DWITH_IO -DSTEPCOUNT -DNOOPT -DVERBOSE=2 $(LDFLAGS)
$(EXEC_TRACE3): ivm_emu.c ivm_emu.h ivm_io.h ivm_emu_hash_table.h
$(CC) $(CFLAGS) $< -o $@ -DWITH_IO -DSTEPCOUNT -DNOOPT -DVERBOSE=3 $(LDFLAGS)
$(EXEC_TRACE4): ivm_emu.c ivm_emu.h ivm_io.h ivm_emu_hash_table.h
$(CC) $(CFLAGS) $< -o $@ -DWITH_IO -DSTEPCOUNT -DNOOPT -DVERBOSE=4 $(LDFLAGS)
clean:
-rm -fv $(EXEC_FAST) $(EXEC_SEQ) $(EXEC_PAR) $(EXEC_HISTO) $(EXEC_TRACE2) $(EXEC_TRACE3) $(EXEC_TRACE4)