-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (22 loc) · 776 Bytes
/
Copy pathMakefile
File metadata and controls
31 lines (22 loc) · 776 Bytes
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
IDL_FILES = Foo.idl Bar.idl
IDL_FILES_NO_SUFFIX=$(basename $(notdir $(IDL_FILES)))
SERIALIZED_IDL_FILES = $(IDL_FILES_NO_SUFFIX:%=%.serialized)
JS_HEADERS = $(IDL_FILES_NO_SUFFIX:%=JS%.h)
JS_IMPLS = $(IDL_FILES_NO_SUFFIX:%=JS%.cpp)
OUTPUT_DIR=out
SERIALIZED_DIR=$(OUTPUT_DIR)/serialized
GENERATED_DIR=$(OUTPUT_DIR)/generated
vpath %.serialized $(SERIALIZED_DIR)
vpath %.h $(GENERATED_DIR)
vpath %.cpp $(GENERATED_DIR)
.PHONY : all clean
all : $(JS_HEADERS) $(JS_IMPLS)
JS%.cpp JS%.h : %.serialized generator.pl
$(info Running generator recipe: $?)
./generator.pl --output=$(GENERATED_DIR) $<
%.serialized : %.idl serializer.pl
$(info Running serializer recipe: $?)
./serializer.pl --output=$(SERIALIZED_DIR) $<
clean :
$(info Cleaning up)
rm -dfr $(OUTPUT_DIR)