forked from amitrupu/TinyComputerArchitecture
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (30 loc) · 720 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
outdir:=out
compile:=sim.veriwell
ifneq ($(OutRootDir),)
outdir:=$(OutRootDir)/$(shell basename $(shell pwd))/$(outdir)
endif
outdir_prefix=$(outdir)
ifneq ($(out),)
outdir:=$(outdir)-$(out)
endif
run waveform debug:
ifneq ($(wildcard ./.isout),)
@$(MAKE) -f Makefile.$(compile) $@
else
ifneq ($(outdir),)
@echo run output: $(outdir)
@if [ ! -d $(outdir) ]; then \
mkdir -p $(outdir); \
/bin/ln -srf * $(outdir); \
touch $(outdir)/.isout; \
if [ -n "$(OutRootDir)" ]; then \
ln -s $(outdir) .; \
fi; \
fi
@$(MAKE) -C $(outdir) outdir= -f Makefile.$(compile) $@
endif
endif
realclean:
rm -rf $(outdir_prefix)* $(shell basename $(outdir_prefix))*
clean:
rm -rf $(outdir) $(shell basename $(outdir))