add anoia.net.constants for SOCK_{STREAM,DGRAM} etc
we use an ugly bit of C preprocessor to get the values from header files, because certain constants are different on MIPS than on other architectures
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
|
||||
default: fs.lua init.lua nl.lua svc.lua
|
||||
default: fs.lua init.lua nl.lua svc.lua net/constants.lua
|
||||
|
||||
test:
|
||||
ln -s . anoia
|
||||
fennel test.fnl
|
||||
fennel test-svc.fnl
|
||||
|
||||
net/constants.lua: net/constants.c
|
||||
$(CC) -imacros sys/socket.h -imacros linux/netlink.h -E -P - < net/constants.c | sed 's/ *$$//g' | cat -s > net/constants.lua
|
||||
|
||||
|
||||
%.lua: %.fnl
|
||||
fennel --compile $< > $@
|
||||
|
Reference in New Issue
Block a user