stage4/generate_c/Makefile
author lbessard
Fri, 18 Jul 2008 14:44:07 +0200
changeset 133 fff75b8283be
parent 70 e1f0ebd2d9ec
child 159 1e4eb0d48385
permissions -rwxr-xr-x
Some bugs on syntax checking tests fixed
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