stage4/generate_c/Makefile
author etisserant
Sun, 07 Sep 2008 10:08:11 +0200
changeset 140 8c0366d41e84
parent 70 e1f0ebd2d9ec
child 159 1e4eb0d48385
permissions -rwxr-xr-x
Added __DEBUG global var to eventually change PLC code execution
70
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
     1
# include the system specific Makefile
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
     2
include ../../Makefile.$(shell uname)
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
     3
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
     4
default: all
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
     5
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
     6
all: generate_c.o
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
     7
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
     8
clean:
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
     9
	-rm -f *.o */*.o Makefile.depend
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    10
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    11
CXXFLAGS += -Wno-unused
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    12
CXXFLAGS += -I. -I../* -I../../absyntax
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    13
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    14
#how to make things from other directories if they are missing
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    15
../% /%:
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    16
	$(MAKE) -C $(@D) $(@F)
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    17
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    18
test_iec_std_lib: test_iec_std_lib.c iec_std_lib.h
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    19
	gcc -o test_iec_std_lib test_iec_std_lib.c
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    20
	
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    21
test: test_iec_std_lib
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    22
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    23
Makefile.depend depend:
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    24
	$(CXX) -MM -MG -I. *.cc \
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    25
	  | perl -pe 's/:/ Makefile.depend:/' > Makefile.depend
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    26
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    27
include Makefile.depend
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    28
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    29
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    30
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    31