5ae5e07d510f1a92a0fb3926179c5f1ecc658c02
[fw/sdcc] / as / 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     = @exec_prefix@
20 bindir          = @bindir@
21 libdir          = @libdir@
22 datadir         = @datadir@
23 includedir      = @include@
24 mandir          = @mandir@
25 man1dir         = $(mandir)/man1
26 man2dir         = $(mandir)/man2
27 infodir         = @infodir@
28
29 CPPFLAGS        = @CPPFLAGS@ -I. -I$(PRJDIR)
30 CFLAGS          = @CFLAGS@ -Wall -DINDEXLIB -DMLH_MAP -DUNIX -DSDK -funsigned-char -ggdb
31 M_OR_MM         = @M_OR_MM@
32 LDFLAGS         = @LDFLAGS@ -lm
33
34 ASOBJECTS       = asdata.o asexpr.o aslex.o aslist.o asmain.o asout.o \
35                   assubr.o assym.o z80adr.o z80ext.o z80mch.o z80pst.o  
36 ASSOURCES       = $(patsubst %.o,%.c,$(ASOBJECTS))
37
38 ASXZ80          = $(PRJDIR)/bin/as-z80
39
40 # Compiling entire program or any subproject
41 # ------------------------------------------
42 all: checkconf $(ASXZ80)
43
44 $(ASXZ80): $(ASOBJECTS)
45         $(CC) $(CFLAGS) -o $@ $(ASOBJECTS) $(LDFLAGS)
46
47 # Compiling and installing everything and runing test
48 # ---------------------------------------------------
49 install: all installdirs
50         $(INSTALL) $(ASXZ80) $(bindir)/as-z80
51
52 # Deleting all the installed files
53 # --------------------------------
54 uninstall:
55         rm -f $(bindir)/as-z80
56
57
58 # Performing self-test
59 # --------------------
60 check:
61
62
63 # Performing installation test
64 # ----------------------------
65 installcheck:
66
67
68 # Creating installation directories
69 # ---------------------------------
70 installdirs:
71         $(INSTALL) -d $(bindir)
72
73
74 # Creating dependencies
75 # ---------------------
76 dep: Makefile.dep
77
78 Makefile.dep: $(ASSOURCES) *.h $(PRJDIR)/*.h
79         $(CPP) $(CPPFLAGS) $(M_OR_MM) $(ASSOURCES) >Makefile.dep
80
81 include Makefile.dep
82 include clean.mk
83
84 # My rules
85 # --------
86 .c.o:
87         $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
88
89
90 # Remaking configuration
91 # ----------------------
92 checkconf:
93         @if [ -f $(PRJDIR)/devel ]; then\
94           $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
95         fi
96
97 # End of Makefile