1 # Makefile for xuni, Linux version
7 SRC_TARGETS
= all depend
clean wc
15 # Project-wide targets
20 ls doc
/html
/* >> FILES
22 echo xuni.exe
>> FILES
23 tar --no-recursion
-cf
dist/xuni.
tar $(shell cat FILES
)
26 # Targets relating to executables
27 .PHONY
: run runa debug profile
35 $(MAKE
) -C
$(SRC
) clean all \
36 '$(shell grep -E "CFLAGS\s?=" $(SRC)/Makefile) -pg'
38 tempfile
--directory .
--prefix prof-
--suffix .out
> profile.name
39 gprof
$(TARGET
) > $(shell cat profile.name
)
40 cp
$(TARGET
) $(TARGET
)_profile
41 $(MAKE
) -C
$(SRC
) clean
42 cp
$(TARGET
)_profile
$(TARGET
)
45 gnome-terminal
-x kprof
-f
$(shell cat profile.name
)
47 # Targets from and relating to src/
52 # Targets from and relating to doc/
58 .PHONY
: memcheck permissions
60 valgrind
--leak-check
=full
-v .
/$(TARGET
) 2>&1\
61 | tee valgrind.output | less
63 chmod
644 $(shell find
-type f
)
64 chmod
755 $(shell find
-type d
) $(TARGET
) $(TARGET
).exe