Makefile
changeset 70 e1f0ebd2d9ec
parent 40 873a5b60a7ea
child 159 1e4eb0d48385
equal deleted inserted replaced
69:41cb5b80416e 70:e1f0ebd2d9ec
     1 # include the system specific Makefile
     1 # include the system specific Makefile
     2 include Makefile.$(shell uname)
     2 include Makefile.$(shell uname)
     3 
     3 
     4 default: all
     4 default: all
     5 
     5 
     6 all: iec2cc iec2iec
     6 all: iec2c iec2iec
     7 
     7 
     8 install: all
     8 install: all
     9 	install -d $(INSTALL_PREDIR)/$(INSTALL_BINDIR)/ 
     9 	install -d $(INSTALL_PREDIR)/$(INSTALL_BINDIR)/ 
    10 	install -d $(INSTALL_PREDIR)/$(IECLIBDIR)/
    10 	install -d $(INSTALL_PREDIR)/$(IECLIBDIR)/
    11 	install iec2cc    $(INSTALL_PREDIR)/$(INSTALL_BINDIR)/
    11 	install iec2c    $(INSTALL_PREDIR)/$(INSTALL_BINDIR)/
    12 	install lib/*.txt $(INSTALL_PREDIR)/$(IECLIBDIR)/
    12 	install lib/*.txt $(INSTALL_PREDIR)/$(IECLIBDIR)/
    13 #	install iec2iec   $(INSTALL_PREDIR)/$(INSTALL_BINDIR)/
    13 #	install iec2iec   $(INSTALL_PREDIR)/$(INSTALL_BINDIR)/
    14 
    14 
    15 
    15 
    16 uninstall:
    16 uninstall:
    17 	rm -f $(INSTALL_PREDIR)/$(INSTALL_BINDIR)/iec2cc
    17 	rm -f $(INSTALL_PREDIR)/$(INSTALL_BINDIR)/iec2c
    18 	rm -f $(INSTALL_PREDIR)/$(INSTALL_BINDIR)/iec2iec
    18 	rm -f $(INSTALL_PREDIR)/$(INSTALL_BINDIR)/iec2iec
    19 	for ff in `cd lib; ls *.txt; cd ..` do echo $$ff done
    19 	for ff in `cd lib; ls *.txt; cd ..` do echo $$ff done
    20 #	for ff in `cd lib; ls *.txt; cd ..` do rm -f $(INSTALL_PREDIR)/$(IECLIBDIR)/$$ff done
    20 #	for ff in `cd lib; ls *.txt; cd ..` do rm -f $(INSTALL_PREDIR)/$(IECLIBDIR)/$$ff done
    21 
    21 
    22 
    22 
    23 clean:
    23 clean:
    24 	-rm -f iec2iec iec2cc *.o absyntax/*.o Makefile.depend
    24 	-rm -f iec2iec iec2c *.o absyntax/*.o Makefile.depend
    25 # make something everywhere (ie, in all Makefiles that have that target)
    25 # make something everywhere (ie, in all Makefiles that have that target)
    26 	find . -depth -mindepth 2 -maxdepth 2 -name Makefile -printf %h\\n | xargs -i make -C{} $@
    26 	find . -depth -mindepth 2 -maxdepth 2 -name Makefile -printf %h\\n | xargs -i make -C{} $@
    27 
    27 
    28 CXXFLAGS += -I.
    28 CXXFLAGS += -I.
    29 
    29 
    30 LIBS  = absyntax/absyntax.o absyntax/visitor.o
    30 LIBS  = absyntax/absyntax.o absyntax/visitor.o
    31 LIBS += stage1_2/stage1_2.o stage1_2/iec.y.o stage1_2/iec.flex.o 
    31 LIBS += stage1_2/stage1_2.o stage1_2/iec.y.o stage1_2/iec.flex.o 
    32 
    32 
    33 iec2cc: main.o stage4/generate_cc/generate_cc.o stage4/stage4.o $(LIBS)
    33 iec2c: main.o stage4/generate_c/generate_c.o stage4/stage4.o $(LIBS)
    34 	$(CXX) -o iec2cc main.o stage4/stage4.o stage4/generate_cc/generate_cc.o $(LIBS)
    34 	$(CXX) -o iec2c main.o stage4/stage4.o stage4/generate_c/generate_c.o $(LIBS)
    35 
    35 
    36 
    36 
    37 iec2iec: main.o stage4/generate_iec/generate_iec.o stage4/stage4.o $(LIBS)
    37 iec2iec: main.o stage4/generate_iec/generate_iec.o stage4/stage4.o $(LIBS)
    38 	$(CXX) -o iec2iec main.o stage4/stage4.o stage4/generate_iec/generate_iec.o $(LIBS)
    38 	$(CXX) -o iec2iec main.o stage4/stage4.o stage4/generate_iec/generate_iec.o $(LIBS)
    39 
    39