bintools/rcomp/group/Makefile.rcomp
changeset 0 044383f39525
equal deleted inserted replaced
-1:000000000000 0:044383f39525
       
     1 # Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 # All rights reserved.
       
     3 # This component and the accompanying materials are made available
       
     4 # under the terms of the License "Eclipse Public License v1.0"
       
     5 # which accompanies this distribution, and is available
       
     6 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 #
       
     8 # Initial Contributors:
       
     9 # Nokia Corporation - initial contribution.
       
    10 # 
       
    11 # Contributors:
       
    12 #
       
    13 
       
    14 CXX    = g++296 
       
    15 YACC   = bison
       
    16 LEX    = flex
       
    17 
       
    18 BLDDIR = ../build
       
    19 SRCDIR = ../src
       
    20 INCDIR = ../inc
       
    21 
       
    22 SOURCE = main.cpp \
       
    23 	 array.cpp astring.cpp ccodes.cpp ctable.cpp \
       
    24 	 datatype.cpp errorhan.cpp fileacc.cpp fileline.cpp \
       
    25 	 indextab.cpp linklist.cpp mem.cpp \
       
    26 	 nameidma.cpp numval.cpp rcbinstr.cpp \
       
    27 	 rcostrm.cpp \
       
    28 	 rcscan.cpp rcstack.cpp resource.cpp \
       
    29 	 stack.cpp stringar.cpp structst.cpp \
       
    30 	 unicode_compressor.cpp \
       
    31  	 localise.cpp \
       
    32 	 qualifar.cpp messages.cpp
       
    33 
       
    34 GENSRC = rcompl.cpp rcomp.cpp
       
    35 OBJECT = $(addprefix $(BLDDIR)/, $(notdir $(SOURCE:.cpp=.o) \
       
    36 					  $(GENSRC:.cpp=.o)))
       
    37 TARGET = $(BLDDIR)/rcomp
       
    38 
       
    39 VPATH  = $(SRCDIR) $(BLDDIR)
       
    40 
       
    41 dummy := $(shell mkdir -p $(BLDDIR))
       
    42 
       
    43 all: $(TARGET)
       
    44 
       
    45 $(TARGET): $(OBJECT)
       
    46 	$(CXX) $^ -o $@
       
    47 	strip $@
       
    48 	
       
    49 $(OBJECT): $(BLDDIR)/rcomp.hpp
       
    50 
       
    51 $(OBJECT): $(BLDDIR)/%.o: %.cpp
       
    52 	$(CXX) $(CXXFLAGS) -D __LINUX__ -I $(INCDIR) -I $(BLDDIR) -c $< -o $@
       
    53 
       
    54 $(BLDDIR)/rcompl.cpp: rcomp.l
       
    55 	$(LEX) -t $< > $@
       
    56 
       
    57 $(BLDDIR)/rcomp.cpp $(BLDDIR)/rcomp.hpp: $(SRCDIR)/rcomp.y
       
    58 	$(YACC) -d $< -o $(BLDDIR)/rcomp.cpp
       
    59 
       
    60 clean:
       
    61 	rm -f $(OBJECT) $(TARGET)
       
    62 	rm -f $(addprefix $(BLDDIR)/, $(GENSRC) rcomp.hpp)
       
    63 	-rmdir $(BLDDIR)
       
    64 
       
    65 test:
       
    66 	@echo "stuff in ../tsrc"
       
    67 
       
    68 .PHONY: all clean test
       
    69