Initial version of donated sources by Avertec, 3.4p5.
[tas-yagle.git] / distrib / sources / api / api / avtwig / Makefile
1 include $(AVERTEC_TOP)/etc/$(AVERTEC_OS).mk
2 include $(AVERTEC_TOP)/etc/libraries.mk
3 include $(AVERTEC_TOP)/etc/Avertec.mk
4
5 LIB_LANG = $(TARGET_LIB)/libavtwig.a
6 LANG_H = Language.h
7
8 LOCAL_INC = -I. -I$(TARGET_INCLUDE)
9
10 LOCAL_CFLAGS = $(CFLAGS) -c
11 LOCAL_YACCFLAGS = $(YACCFLAGS) -d
12 LOCAL_CPPFLAGS = $(CPPFLAGS) $(LOCAL_INC) \
13 -DAVERTEC -D$(AVERTEC_LICENSE) \
14 -DAVT_H='<$(AVT_H)>' \
15 -DMLU_H='<$(MLU_H)>' \
16 -DMLO_H='<$(MLO_H)>' \
17 -DLOG_H='<$(LOG_H)>' \
18 -DBVL_H='<$(BVL_H)>' \
19 -DBEH_H='<$(BEH_H)>' \
20 -DBHL_H='<$(BHL_H)>' \
21 -DMUT_H='<$(MUT_H)>' \
22 -DMSL_H='<$(MSL_H)>' \
23 -DRCN_H='<$(RCN_H)>' \
24 -DCNS_H='<$(CNS_H)>' \
25 -DYAG_H='<$(YAG_H)>' \
26 -DGEN_H='<$(GEN_H)>' \
27 -DAPI_H='<$(API_H)>' \
28 -DFCL_H='<$(FCL_H)>'
29
30 OBJ = wrapper_lexer.o wrapper_parser.o
31 OBJCPP = Language.o
32
33 SOURCES_LIB=$(OBJ:.o=.c)
34 SOURCES_LIB0=$(OBJCPP:.o=.cc)
35
36 PRE_OBJ = wrapper_parser.c wrapper_parser.h wrapper_parser.output wrapper_lexer.c
37
38 $(LIB_LANG) : $(OBJ) $(OBJCPP)
39 $(AR) $(ARFLAGS) $(LIB_LANG) $(OBJ) $(OBJCPP)
40 $(RANLIB) $(LIB_LANG)
41
42 %.o: %.c
43 $(CC) -c $(LOCAL_CFLAGS) $(LOCAL_CPPFLAGS) $<
44
45 %.o: %.cc
46 $(CC) -c $(LOCAL_CFLAGS) $(LOCAL_CPPFLAGS) $<
47
48 wrapper_parser.c wrapper_parser.h: wrapper_parser.y
49 $(YACC) $(LOCAL_YACCFLAGS) $< -o wrapper_parser.c
50
51 wrapper_lexer.c: wrapper_lexer.l wrapper_parser.h
52 $(LEX) -t $< > $@
53
54 clean :
55 -@$(RM) -f $(OBJ) $(OBJCPP) $(PRE_OBJ) .depend > /dev/null 2>&1
56
57 realclean : clean
58 -@$(RM) -f $(LIB_LANG)
59
60 dep: $(SOURCES_LIB) $(SOURCES)
61 $(CC) -MM $(LOCAL_CFLAGS) $(LOCAL_CPPFLAGS) $(SOURCES) $(SOURCES_LIB) $(SOURCES_LIB0) > .depend
62
63 -include .depend
64