stage1_2/Makefile
changeset 258 d7d92b2f87e9
parent 257 90782e241346
parent 243 bdfee1f5be9e
child 279 c0453b7f99df
equal deleted inserted replaced
257:90782e241346 258:d7d92b2f87e9
     6 default: all
     6 default: all
     7 
     7 
     8 all: iec.flex.o iec.y.o stage1_2.o
     8 all: iec.flex.o iec.y.o stage1_2.o
     9 
     9 
    10 clean:
    10 clean:
       
    11 	echo > Makefile.depend
    11 	-rm -f iec.flex.c iec.y.cc iec.y.hh iec.y.output
    12 	-rm -f iec.flex.c iec.y.cc iec.y.hh iec.y.output
    12 	-rm -f iec.noerrorcheck.y
    13 	-rm -f iec.noerrorcheck.y
    13 	-rm -f test_flex
    14 	-rm -f test_flex
    14 	-rm -f stage1_2.o
    15 	-rm -f stage1_2.o
    15 	-rm -f iec.y.o
    16 	-rm -f iec.y.o
    16 	-rm -f iec.flex.o
    17 	-rm -f iec.flex.o
       
    18 	-rm -f Makefile.depend
    17 
    19 
    18 
    20 
    19 CFLAGS += -I. -I../* -I../../absyntax
    21 CFLAGS += -I. -I../* -I../../absyntax
    20 
    22 
    21 iec.flex.c: iec.flex
    23 iec.flex.c: iec.flex
    22 	flex -oiec.flex.c iec.flex
    24 	flex -oiec.flex.c iec.flex
    23 
    25 
    24 stage1_2.o: stage1_2.cc iec.y.hh 
    26 stage1_2.cc: iec.y.hh 
       
    27 stage1_2.o: stage1_2.cc
    25 
    28 
    26 iec.flex.o: iec.y.hh iec.flex.c
    29 iec.flex.o: iec.y.hh iec.flex.c
    27 	$(CXX) -c iec.flex.c -D DEFAULT_LIBDIR='"$(IECLIBDIR)"' $(CFLAGS)
    30 	$(CXX) -c iec.flex.c -D DEFAULT_LIBDIR='"$(IECLIBDIR)"' $(CFLAGS)
    28 
    31 
    29 iec.y.hh iec.y.cc: iec.y
    32 iec.y.hh iec.y.cc: iec.y
    41 
    44 
    42 #how to make things from other directories if they are missing
    45 #how to make things from other directories if they are missing
    43 ../% /%:
    46 ../% /%:
    44 	$(MAKE) -C $(@D) $(@F)
    47 	$(MAKE) -C $(@D) $(@F)
    45 
    48 
       
    49 
       
    50 Makefile.depend depend:
       
    51 	$(CXX) -MM -MG -I. *.cc \
       
    52 	  | sed 's/:/ Makefile.depend:/' > Makefile.depend
       
    53 
       
    54 include Makefile.depend
       
    55 
       
    56