stage4/generate_c/Makefile
author Mario de Sousa <msousa@fe.up.pt>
Wed, 30 Mar 2011 19:53:32 +0100
changeset 257 90782e241346
parent 159 1e4eb0d48385
child 243 bdfee1f5be9e
permissions -rwxr-xr-x
Huge change.
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:
159
1e4eb0d48385 Try to clean Makefile. Not a real success.
etisserant
parents: 70
diff changeset
     9
	echo > Makefile.depend
1e4eb0d48385 Try to clean Makefile. Not a real success.
etisserant
parents: 70
diff changeset
    10
	-rm -f *.o */*.o
70
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    11
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    12
CXXFLAGS += -Wno-unused
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    13
CXXFLAGS += -I. -I../* -I../../absyntax
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    14
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    15
#how to make things from other directories if they are missing
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    16
../% /%:
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    17
	$(MAKE) -C $(@D) $(@F)
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    18
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    19
test_iec_std_lib: test_iec_std_lib.c iec_std_lib.h
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    20
	gcc -o test_iec_std_lib test_iec_std_lib.c
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    21
	
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    22
test: test_iec_std_lib
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    23
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    24
Makefile.depend depend:
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    25
	$(CXX) -MM -MG -I. *.cc \
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    26
	  | perl -pe 's/:/ Makefile.depend:/' > Makefile.depend
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    27
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    28
include Makefile.depend
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
e1f0ebd2d9ec Change generate_cc to generate_c
lbessard
parents:
diff changeset
    32