builddir fix
[mplib] / src / texk / web2c / mpdir / lib / Makefile.cross
1
2 # this is a crude hack to get a cross-compiled binary
3 # prerequisites:
4 # - the cross compiler has to be installed under /usr/mingw32
5 # - you have to run <toplevel>/metapost/build.cross,
6 #   then rename 'build' to 'cross' (for libkpathsea.a)
7
8 srcdir = .
9
10 KPSEBUILDDIR = ../../../../../cross/texk/kpathsea/.libs
11 KPSESRCDIR = ../../..
12
13 RM = rm
14 LD = env PATH=/usr/mingw32/mingw32/bin:$$PATH gcc
15 CC = env PATH=/usr/mingw32/mingw32/bin:$$PATH gcc
16 CTANGLE = ctangle
17
18 CFLAGS = -Wall -W -g -I../../..
19 OBJECTS = avl.o mp.o mpost.o psout.o
20
21 newmpost.exe: $(OBJECTS) avl.h $(KPSEBUILDDIR)/libkpathsea.a
22         $(LD) -o newmpost.exe $(OBJECTS) $(KPSEBUILDDIR)/libkpathsea.a 
23
24 mp.c: mp.w psout.c
25         $(CTANGLE) mp.w
26
27 mpost.c: mpost.w 
28         $(CTANGLE) mpost.w 
29
30 psout.c: psout.w 
31         $(CTANGLE) psout.w 
32
33 $(OBJECTS): %.o: %.c
34         $(CC) -c $(CFLAGS) -I$(KPSESRCDIR) $< -o $@
35
36 clean:
37         $(RM) *.o newmpost.exe mp.c mpost.c psout.c mp*.h