-
Notifications
You must be signed in to change notification settings - Fork 65
/
Makefile
49 lines (37 loc) · 1.03 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
INCLUDE_DIRS := -Isrc -Isrc/devices -Isrc/utilities -I.
OPTSLIVE := -flto -D FCF_FC_NETWORK
OPTSDEV := -flto
OPTSPROF := -pg
OPTS := -Ofast
WARNINGS := -Wall -Wextra -Wwrite-strings -Wno-missing-field-initializers -Wno-unused-parameter
CFLAGS := -MD -std=gnu99 -g $(OPTS) $(WARNINGS) -fno-strict-aliasing $(INCLUDE_DIRS)
LDFLAGS := -g
LDLIBS := -lrt -lm
.DEFAULT_GOAL := all
OBJECTS += elderberry/fcfutils.o fcfmain.o
MAINMIML ?= main.miml
MIMLMK ?= miml.mk
-include $(MIMLMK)
all: debug
live: CFLAGS += $(OPTSLIVE)
live: LDFLAGS += $(OPTSLIVE)
live: fc
debug: CFLAGS += $(OPTSDEV)
debug: LDFLAGS += $(OPTSDEV)
debug: fc
prof: CFLAGS += $(OPTSPROF)
prof: LDFLAGS += $(OPTSPROF)
prof: fc
fc: miml $(OBJECTS)
$(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LOADLIBES) $(LDLIBS)
miml: $(MIMLMK)
$(MIMLMK): $(MAINMIML)
python ./elderberry/codeGen.py -mch $^
packet:
gen-psas-types > src/utilities/psas_packet.h
cleanbuild:
rm `find . -name '*.o'` -f
rm `find . -name '*.d'` -f
clean: cleanbuild
rm -f $(MIMLMK) fcfmain.c fcfmain.h
rm -f fc