unoidl2

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/unoidl2.git/
Log | Files | Refs

Makefile (1630B)


      1 LIBO=/opt/libo
      2 
      3 CC=diet gcc
      4 CFLAGS=-std=c99 -O2
      5 
      6 ALL=unoidl2ast unoidl2xml unoidl2java javasplit
      7 
      8 all: $(ALL)
      9 
     10 scan.c: parse.c.h scan.ll
     11 	flex -o$@ scan.ll
     12 
     13 parse.c.h: parse.c
     14 
     15 parse.c: parse.y
     16 	bison -v --defines=$@.h -o$@ $<
     17 
     18 unoidl2.c: parse.o
     19 unoidl2ast.o: parse.o
     20 
     21 unoidl2ast: unoidl2ast.o unoidl2.o scan.o parse.o
     22 	$(CC) -o$@ $< unoidl2.o scan.o parse.o
     23 	strip $@
     24 unoidl2xml: unoidl2xml.o unoidl2.o scan.o parse.o
     25 	$(CC) -o$@ $< unoidl2.o scan.o parse.o
     26 	strip $@
     27 unoidl2java: unoidl2java.o unoidl2.o scan.o parse.o
     28 	$(CC) -o$@ $< unoidl2.o scan.o parse.o
     29 	strip $@
     30 javasplit: javasplit.o
     31 	$(CC) -o$@ $<
     32 	strip $@
     33 
     34 offapi.list:
     35 	find $(LIBO)/offapi/ -name '*.idl' >$@
     36 udkapi.list:
     37 	find $(LIBO)/udkapi/ -name '*.idl' >$@
     38 all.list: offapi.list udkapi.list
     39 	cat udkapi.list offapi.list >$@
     40 all.idl: all.list
     41 	sed -e "s@/opt/libo/udkapi/@@g" -e "s@/opt/libo/offapi/@@g" -e "s@.*@#include <&>@g" $< >$@
     42 allpp.idl: all.idl
     43 	cpp -P -I$(LIBO)/offapi -I$(LIBO)/udkapi $< >$@
     44 java.list: allpp.idl
     45 	rm -rf java
     46 	mkdir -p java/src java/build
     47 	cat allpp.idl | ./unoidl2java > allpp.java
     48 	cat allpp.java | (cd java/src ; ../../javasplit)
     49 	(cd java/src ; find com -name '*.java') >java.list
     50 	(cd java/src ; javac -cp $(LIBO)/ridljar:. -d ../build @../../java.list)
     51 
     52 allpp.ast: allpp.idl
     53 	cat $< | ./unoidl2ast >$@
     54 allpp.xml: allpp.idl
     55 	cat $< | ./unoidl2xml >$@
     56 allpp.java: allpp.idl
     57 	cat $< | ./unoidl2java >$@
     58 allpp.py: allpp.idl
     59 	cat $< | ./unoidl2py >$@
     60 allpp.js: allpp.idl
     61 	cat $< | ./unoidl2js >$@
     62 allpp.bas: allpp.idl
     63 	cat $< | ./unoidl2bas >$@
     64 
     65 clean:
     66 	rm -rf $(ALL) scan.c parse.c.h parse.c parse.output *.o *.list all.* allpp.*