forked from pce-devel/huc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (44 loc) · 1.11 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
#
# Makefile for HuC sources
#
SUBDIRS = src tgemu examples
all clean: bin
@$(MAKE) $(SUBDIRS) "COMMAND=$@"
bin:
mkdir -p bin
.PHONY: $(SUBDIRS) test
$(SUBDIRS):
@echo " "
@echo " -----> make $(COMMAND) in $@"
$(MAKE) --directory=$@ $(COMMAND)
install:
cp -p bin/* /usr/local/bin
mkdir -p /usr/include/huc
cp -pr include/huc/* /usr/include/huc/
test:
@cd test ; /bin/sh ./test_compiler.sh
@cd test ; /bin/sh ./test_hucc.sh
check:
@cd test ; /bin/sh ./test_examples.sh
DATE = $(shell date +%F)
ifneq ($(OS),Windows_NT)
PLATFORMSUFFIX = $(shell uname)
else
PLATFORMSUFFIX = Win64
endif
package:
mkdir -p tmp
strip bin/*
mv bin/* tmp/
$(MAKE) --directory=src clean > /dev/null
$(MAKE) --directory=tgemu clean > /dev/null
find examples -type f -name '*.s' -delete
find examples -type f -name '*.lst' -delete
find examples -type f -name '*.sym' -delete
find examples -type f -name '*.ovl' -delete
find examples/asm -type f -name '*.bin' -delete
mv tmp/* bin/
rm -d tmp
rm -f huc-$(DATE)-$(PLATFORMSUFFIX).zip
zip -r huc-$(DATE)-$(PLATFORMSUFFIX).zip * -x *.zip -x .*
examples: src