Makefile
author Mario de Sousa <msousa@fe.up.pt>
Fri, 01 Apr 2011 10:47:24 +0100
changeset 265 4d222f46f8cc
parent 243 bdfee1f5be9e
child 268 1eba01e3fb70
permissions -rwxr-xr-x
Updating license info (with Edouard's permission for relevant files).
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
     1
# include the system specific Makefile
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 15
diff changeset
     2
include Makefile.$(shell uname)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 15
diff changeset
     3
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
     4
default: all
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
     5
70
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents: 40
diff changeset
     6
all: iec2c iec2iec
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
     7
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
     8
install: all
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
     9
	install -d $(INSTALL_PREDIR)/$(INSTALL_BINDIR)/ 
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    10
	install -d $(INSTALL_PREDIR)/$(IECLIBDIR)/
70
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents: 40
diff changeset
    11
	install iec2c    $(INSTALL_PREDIR)/$(INSTALL_BINDIR)/
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    12
	install lib/*.txt $(INSTALL_PREDIR)/$(IECLIBDIR)/
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    13
#	install iec2iec   $(INSTALL_PREDIR)/$(INSTALL_BINDIR)/
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    14
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    15
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    16
uninstall:
70
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents: 40
diff changeset
    17
	rm -f $(INSTALL_PREDIR)/$(INSTALL_BINDIR)/iec2c
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    18
	rm -f $(INSTALL_PREDIR)/$(INSTALL_BINDIR)/iec2iec
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    19
	for ff in `cd lib; ls *.txt; cd ..` do echo $$ff done
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    20
#	for ff in `cd lib; ls *.txt; cd ..` do rm -f $(INSTALL_PREDIR)/$(IECLIBDIR)/$$ff done
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    21
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    22
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    23
clean:
159
1e4eb0d48385 Try to clean Makefile. Not a real success.
etisserant
parents: 70
diff changeset
    24
	-rm -f iec2iec iec2c *.o absyntax/*.o
1e4eb0d48385 Try to clean Makefile. Not a real success.
etisserant
parents: 70
diff changeset
    25
	echo > Makefile.depend
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    26
# make something everywhere (ie, in all Makefiles that have that target)
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    27
	find . -depth -mindepth 2 -maxdepth 2 -name Makefile -printf %h\\n | xargs -i make -C{} $@
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    28
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    29
CXXFLAGS += -I.
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    30
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    31
LIBS  = absyntax/absyntax.o absyntax/visitor.o
181
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 178
diff changeset
    32
LIBS += stage1_2/stage1_2.o stage1_2/iec.y.o stage1_2/iec.flex.o
202
da1a8186f86f Initial (very rough) version of semantic checker (stage3)
Catarina Boucinha <ccb@fe.up.pt>
parents: 181
diff changeset
    33
LIBS += stage3/stage3.o
da1a8186f86f Initial (very rough) version of semantic checker (stage3)
Catarina Boucinha <ccb@fe.up.pt>
parents: 181
diff changeset
    34
LIBS += stage3/visit_expression_type.o
181
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 178
diff changeset
    35
LIBS += absyntax_utils/absyntax_utils.o
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 178
diff changeset
    36
LIBS += absyntax_utils/search_expression_type.o
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 178
diff changeset
    37
LIBS += absyntax_utils/decompose_var_instance_name.o
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 178
diff changeset
    38
LIBS += absyntax_utils/function_call_iterator.o
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 178
diff changeset
    39
LIBS += absyntax_utils/function_call_param_iterator.o
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 178
diff changeset
    40
LIBS += absyntax_utils/function_param_iterator.o
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 178
diff changeset
    41
LIBS += absyntax_utils/search_base_type.o
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 178
diff changeset
    42
LIBS += absyntax_utils/search_constant_type.o
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 178
diff changeset
    43
LIBS += absyntax_utils/search_fb_instance_decl.o
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 178
diff changeset
    44
LIBS += absyntax_utils/search_fb_typedecl.o
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 178
diff changeset
    45
LIBS += absyntax_utils/search_varfb_instance_type.o
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 178
diff changeset
    46
LIBS += absyntax_utils/search_var_instance_decl.o
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 178
diff changeset
    47
LIBS += absyntax_utils/spec_init_separator.o
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 178
diff changeset
    48
LIBS += absyntax_utils/type_initial_value.o
202
da1a8186f86f Initial (very rough) version of semantic checker (stage3)
Catarina Boucinha <ccb@fe.up.pt>
parents: 181
diff changeset
    49
LIBS += absyntax_utils/add_en_eno_param_decl.o
da1a8186f86f Initial (very rough) version of semantic checker (stage3)
Catarina Boucinha <ccb@fe.up.pt>
parents: 181
diff changeset
    50
LIBS += absyntax_utils/get_sizeof_datatype.o
181
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 178
diff changeset
    51
LIBS += absyntax_utils/get_function_type.o
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 178
diff changeset
    52
38d6eb056260 Moving absyntax utility files out from stage4/generate_c
mario
parents: 178
diff changeset
    53
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    54
70
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents: 40
diff changeset
    55
iec2c: main.o stage4/generate_c/generate_c.o stage4/stage4.o $(LIBS)
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents: 40
diff changeset
    56
	$(CXX) -o iec2c main.o stage4/stage4.o stage4/generate_c/generate_c.o $(LIBS)
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    57
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    58
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    59
iec2iec: main.o stage4/generate_iec/generate_iec.o stage4/stage4.o $(LIBS)
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    60
	$(CXX) -o iec2iec main.o stage4/stage4.o stage4/generate_iec/generate_iec.o $(LIBS)
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    61
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    62
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    63
#how to make things in subdirectories etc
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    64
../% /% absyntax/% stage1_2/% stage3/% stage4/% util/%:
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    65
	$(MAKE) -C $(@D) $(@F)
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    66
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    67
Makefile.depend depend:
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    68
	$(CXX) -MM -MG -I. *.cc \
243
bdfee1f5be9e Updated makefiles for cygwin build with no perl
Lolitech
parents: 202
diff changeset
    69
	  | sed 's/:/ Makefile.depend:/' > Makefile.depend
0
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    70
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    71
include Makefile.depend
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    72
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    73
fb772792efd1 Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff changeset
    74