forked from CTSRD-CHERI/gxemul
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.skel
69 lines (57 loc) · 2.21 KB
/
Makefile.skel
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
58
59
60
61
62
63
64
65
66
67
68
#
# Makefile for GXemul
#
BIN=gxemul
LIBS=$(XLIB) $(OTHERLIBS)
all: build
build: do_src
$(CXX) $(COPTIM) src/components/*/*.o src/console/*.o src/cpus/*.o src/debugger/*.o src/devices/*.o src/disk/*.o src/file/*.o src/machines/*.o src/main/*.o src/main/*/*.o src/net/*.o src/old_main/*.o src/promemul/*.o src/symbol/*.o src/ui/*/*.o $(LIBS) -o $(BIN)
do_src:
cd src; $(MAKE)
test: build
test/check_delete_calls.sh
@rm -f tmp_valgrind.out
$(VALGRIND) ./$(BIN) -WW@U
@if [ -s tmp_valgrind.out ]; then cat tmp_valgrind.out; false; fi
documentation: build
sed s/PAGETITLE/Machines/g < doc/head.html > doc/machines.html
./$(BIN) -WW@M >> doc/machines.html
cat doc/tail.html >> doc/machines.html
sed s/PAGETITLE/Components/g < doc/head.html > doc/components.html
./$(BIN) -WW@C >> doc/components.html
cat doc/tail.html >> doc/components.html
doc/generate_machine_doc.sh
$(DOXYGEN) doc/Doxyfile
install: documentation test
@echo Installing binaries, man page, and documentation...
mkdir -p $(PREFIX)/bin
cp -f $(BIN) $(PREFIX)/bin/
mkdir -p $(PREFIX)/man/man1
cp -f man/gxemul.1 $(PREFIX)/man/man1/
mkdir -p $(PREFIX)/share/doc/gxemul
cp -R doc/* $(PREFIX)/share/doc/gxemul/
uninstall:
@echo Removing binaries, man pages, and documentation...
rm -f $(PREFIX)/bin/gxemul
rm -f $(PREFIX)/man/man1/gxemul.1
rm -rf $(PREFIX)/share/doc/gxemul
clean:
rm -f $(BIN) *core core.* *.gmon _* *.exe ktrace.out tmp_*.out*
rm -f unittest*.h components*.h commands*.h
rm -rf doc/doxygen
cd src; $(MAKE) clean
# experiments and demos are not cleaned on a normal clean, only on a clean_all.
clean_all: clean
cd experiments; $(MAKE) clean_all
cd demos; $(MAKE) clean
rm -f config.h Makefile src/Makefile src/cpus/Makefile
rm -f src/ui/*/Makefile src/ui/Makefile src/main/fileloaders/Makefile
rm -f src/main/commands/Makefile
rm -f src/components/Makefile src/components/*/Makefile
rm -f src/debugger/Makefile src/devices/Makefile
rm -f src/devices/fonts/Makefile src/disk/Makefile
rm -f src/file/Makefile src/machines/Makefile
rm -f src/main/Makefile src/old_main/Makefile src/net/Makefile
rm -f src/promemul/Makefile src/include/Makefile
rm -f src/useremul/Makefile src/include/Makefile
rm -f src/console/Makefile src/symbol/Makefile