Browse Source

example1 - update makefile

main
heck 2 years ago
parent
commit
3806d47188
  1. 21
      examples/Makefile
  2. 28
      examples/example1/Makefile

21
examples/Makefile

@ -1,21 +0,0 @@
# TODO:
# Incremental compilation impossible without redundantly specifying
# files that will be generated in the makefile
TARGET_XML+=interface_example1.xml
.PHONY: all xml clean
all: c_interface $(TARGET_XML)
c_interface:
YML_PATH=../idl yml2proc -y ../lm-c99/ig-c99.ysl2 interface_example1.yml2
xml: $(TARGET_XML)
%.xml: %.yml2
YML_PATH=../idl yml2proc -P $< -o $@
clean:
rm -f *.xml *.xsl *.h

28
examples/example1/Makefile

@ -0,0 +1,28 @@
YML_PATH+=:../../idl
COMPILER=../../lm-c99/ig-c99.ysl2
BUILD_DIR=ig-c99
SRC=$(wildcard *.yml2)
SRC_XML=$(addsuffix .xml, $(basename $(SRC)))
.PHONY: all xml compile clean
all: xml compile
compile: $(BUILD_DIR)/*
xml: $(SRC_XML)
$(BUILD_DIR)/*: $(BUILD_DIR) $(SRC) $(COMPILER)
YML_PATH=$(YML_PATH) yml2proc -y $(COMPILER) $(SRC)
$(BUILD_DIR):
mkdir $(BUILD_DIR)
%.xml: %.yml2
YML_PATH=$(YML_PATH) yml2proc -P $< -o $@
clean:
rm -rf \
./$(BUILD_DIR) \
$(SRC_XML)
Loading…
Cancel
Save