Trying to put Makefile and Makewin under version control.
[xuni.git] / Makefile
blobabb9ef731f8a58294b35a348c62ea1c8d5717fbe
1 # Makefile for xuni, Linux version
3 TARGET = ./xuni
5 SRC = src
6 SRC_TARGETS = all xuni depend clean
8 DOC = doc
10 # Default target: all
11 .PHONY: all
12 all:
14 # Targets relating to executables
15 .PHONY: run runa debug profile
16 run: $(TARGET)
17 $(TARGET)
18 runa: $(TARGET)
19 $(TARGET) $(ARGS)
20 debug: $(TARGET)
21 $(GDB) $(TARGET)
22 profile: clean $(TARGET) clean
23 $(TARGET)
24 tempfile --directory . --prefix prof- --suffix .out > profile.name
25 gprof $(TARGET) > $(shell cat profile.name)
26 kprof -f $(shell cat profile.name)
28 # Targets from and relating to src/
29 .PHONY: $(SRC)
30 $(SRC_TARGETS):
31 $(MAKE) -C $(SRC) $@
33 # Targets from and relating to doc/
34 .PHONY: $(DOC)
35 $(DOC):
36 #$(MAKE) -C $(DOC)
37 cd $(DOC); rm -r html; doxygen Doxyfile
39 # Linux-only targets
40 .PHONY: memcheck permissions
41 memcheck: $(TARGET)
42 valgrind --leak-check=full -v ./$(TARGET) 2>&1\
43 | tee valgrind.output | less
44 permissions:
45 chmod 644 $(shell find -type f)
46 chmod 755 $(shell find -type d) $(TARGET) $(TARGET).exe