source: liacs/ca/opdr2b/src/Makefile@ 7

Last change on this file since 7 was 2, checked in by Rick van der Zwet, 15 years ago

Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)

  • Property svn:executable set to *
File size: 1.0 KB
Line 
1#IMPORTANT:
2# This Makefile does not work with /bin/make, only with
3# /usr/local/gnu/bin/make.
4# Change your path if needed.
5#
6# Compiler and options:
7CC = gcc
8BINARY = simulator
9CPPFLAGS = -g -Wall
10CFLAGS =
11# Sources:
12CFILES := $(wildcard *.c)
13OFILES := $(patsubst %.c,%.o,$(CFILES))
14# Make automatic dependency files (*.d):
15%.d: %.c
16 $(SHELL) -ec 'gcc -MM $(CPPFLAGS) $< | sed '\''s/$*\.o/& $@/'\'' > $@'
17$(BINARY): $(OFILES)
18 gcc -o $(BINARY) $(OFILES)
19include $(CFILES:.c=.d)
20
21all: $(BINARY)
22
23run: all
24 ./$(BINARY) < ./rfac.i
25
26clean:
27 -rm -f *.o $(BINARY)
28
29dist-clean: clean
30 -rm -f *.d
31
32help:
33 @echo "Usage:"
34 @echo "make clean = remove binary files"
35 @echo "make dist-clean = remove build files as well"
36 @echo "make run = build, run simulator"
37
38report:
39 @rm -f opdr2b.ps*
40 @a2ps --footer="Rick van der Zwet - CA assigment2b - 0433373" -P \
41 file --highlight-level=normal --toc --output=opdr2b.ps --sides=1 \
42 Makefile README.txt alu.h constant.h control.h datapath.h imm.h \
43 memory.h sim.h alu.c constant.c control.c datapath.c imm.c memory.c \
44 sim.c rfac.i rfac.s
Note: See TracBrowser for help on using the repository browser.