Merged in multiple assemblers port.
[fw/sdcc] / link / z80 / Makefile.in
1 #
2 #
3 #
4
5 VERSION         = @VERSION@
6 VERSIONHI       = @VERSIONHI@
7 VERSIONLO       = @VERSIONLO@
8 VERSIONP        = @VERSIONP@
9
10 SHELL           = /bin/sh
11 CC              = @CC@
12 CPP             = @CPP@
13 INSTALL         = @INSTALL@
14
15 PRJDIR          = ../..
16
17 srcdir          = @srcdir@
18 prefix          = @prefix@
19 exec_prefix     = ${prefix}
20 bindir          = ${exec_prefix}/bin
21 libdir          = ${exec_prefix}/lib
22 datadir         = ${prefix}/share
23 includedir      = ${prefix}/include
24 mandir          = ${prefix}/man
25 man1dir         = $(mandir)/man1
26 man2dir         = $(mandir)/man2
27 infodir         = ${prefix}/info
28
29 CPPFLAGS        = @CPPFLAGS@ -I. -I$(PRJDIR) -I$(PRJDIR)/as/z80
30 CFLAGS          = @CFLAGS@ -Wall -DINDEXLIB -DMLH_MAP -DUNIX -DSDK -DSDK_VERSION_STRING="\"3.0.0\"" -DTARGET_STRING="\"gbz80\"" -funsigned-char
31 M_OR_MM         = @M_OR_MM@
32 LDFLAGS         = @LDFLAGS@ -lm
33
34 LKOBJECTS       = lkarea.o lkdata.o lkeval.o lkhead.o lkihx.o lklex.o \
35                   lklibr.o lklist.o lkmain.o lkrloc.o lks19.o lksym.o \
36                   lkgb.o lkgg.o 
37 LKSOURCES       = $(patsubst %.o,%.c,$(LKOBJECTS))
38
39 LKZ80           = $(PRJDIR)/bin/link-z80
40
41 # Compiling entire program or any subproject
42 # ------------------------------------------
43 all: checkconf $(LKZ80)
44
45 $(LKZ80): $(LKOBJECTS)
46         $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LKOBJECTS) 
47
48 # Compiling and installing everything and runing test
49 # ---------------------------------------------------
50 install: all installdirs
51         $(INSTALL) -s $(LKZ80) $(bindir)/link-z80
52
53 # Deleting all the installed files
54 # --------------------------------
55 uninstall:
56         rm -f $(bindir)/link-z80
57
58
59 # Performing self-test
60 # --------------------
61 check:
62
63
64 # Performing installation test
65 # ----------------------------
66 installcheck:
67
68
69 # Creating installation directories
70 # ---------------------------------
71 installdirs:
72         $(INSTALL) -d $(bindir)
73
74
75 # Creating dependencies
76 # ---------------------
77 dep: Makefile.dep
78
79 Makefile.dep: $(LKSOURCES) *.h $(PRJDIR)/*.h
80         $(CPP) $(CPPFLAGS) $(M_OR_MM) $(LKSOURCES) >Makefile.dep
81
82 include Makefile.dep
83 include clean.mk
84
85 # My rules
86 # --------
87 .c.o:
88         $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
89
90
91 # Remaking configuration
92 # ----------------------
93 checkconf:
94         @if [ -f $(PRJDIR)/devel ]; then\
95           $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
96         fi
97
98 # End of Makefile