-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (29 loc) · 776 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
CFLAGS = -O0 -g3 -Wall -Wno-unknown-pragmas
SRC = main.c datastructs.c indices.c
CC = gcc
all: atomdis
atomdis: $(SRC:.c=.o)
$(CC) -o atomdis $^
# Autogenerated files
datastructs_gen.c: atombios.h atombios_rev.h datastructs_factory.pl
cpp atombios_rev.h | perl ./datastructs_factory.pl > datastructs_gen.c 2>/dev/null || cpp atombios_rev.h | perl ./datastructs_factory.pl >/dev/null
# Clean
clean: _always_
-rm -f *.o *.d
-rm -f datastructs_gen.c
distclean: clean
-rm -f *~
-rm -f atomdis
# Depend
depend: _always_
-rm -f *.d
make dependfiles
dependfiles: $(SRC:.c=.d)
$(SRC:.c=.d): datastructs_gen.c
gcc -MM -MF $@ $(@:.d=.c)
-include $(SRC:.c=.d)
# Special Flags + Dependencies
datastructs.o: CFLAGS += -Wno-unused
_always_:
@true
#EOF