Commit | Line | Data |
---|---|---|
12ae5dfc | 1 | LD = $(CC) |
4d7c7898 | 2 | CCFLAGS = -c |
2f42fcb0 | 3 | DEFINES = -DPERL_CORE -DPERL_MICRO -DSTANDARD_C -DPERL_USE_SAFE_PUTENV |
4 | OPTIMIZE = | |
a24ffc0b | 5 | CFLAGS = $(DEFINES) $(OPTIMIZE) |
4d7c7898 | 6 | LDFLAGS = |
12ae5dfc | 7 | LIBS = -lm |
8 | _O = .o | |
2f42fcb0 | 9 | ENV = env |
2eacba2f | 10 | PERL = perl |
4d7c7898 | 11 | _X = |
12 | RUN = | |
12ae5dfc | 13 | |
14 | all: microperl | |
15 | ||
16 | O = uav$(_O) udeb$(_O) udoio$(_O) udoop$(_O) udump$(_O) \ | |
e1a479c5 | 17 | uglobals$(_O) ugv$(_O) uhv$(_O) umro$(_O)\ |
530ffa68 | 18 | umg$(_O) uperlmain$(_O) uop$(_O) ureentr$(_O) \ |
19 | upad$(_O) uperl$(_O) uperlio$(_O) uperly$(_O) upp$(_O) \ | |
84d4ea48 | 20 | upp_ctl$(_O) upp_hot$(_O) upp_sys$(_O) upp_pack$(_O) upp_sort$(_O) \ |
12ae5dfc | 21 | uregcomp$(_O) uregexec$(_O) urun$(_O) \ |
22 | uscope$(_O) usv$(_O) utaint$(_O) utoke$(_O) \ | |
7ee2227d | 23 | unumeric$(_O) ulocale$(_O) umathoms$(_O) \ |
48462a74 | 24 | uuniversal$(_O) uutf8$(_O) uutil$(_O) uperlapi$(_O) |
12ae5dfc | 25 | |
26 | microperl: $(O) | |
4d7c7898 | 27 | $(LD) -o $@ $(O) $(LDFLAGS) $(LIBS) |
12ae5dfc | 28 | |
29 | H = av.h uconfig.h cop.h cv.h embed.h embedvar.h form.h gv.h handy.h \ | |
dd2155a4 | 30 | hv.h intrpvar.h iperlsys.h mg.h op.h opcode.h opnames.h pad.h \ |
31 | patchlevel.h perl.h perlsdio.h perlvars.h perly.h pp.h \ | |
907b3e23 | 32 | pp_proto.h proto.h reentr.h regexp.h scope.h sv.h \ |
4d7c7898 | 33 | thread.h unixish.h utf8.h util.h uudmap.h warnings.h |
12ae5dfc | 34 | |
35 | HE = $(H) EXTERN.h | |
36 | ||
37 | clean: | |
4d7c7898 | 38 | -rm -f $(O) microperl generate_uudmap$(_X) uudmap.h |
12ae5dfc | 39 | |
40 | distclean: clean | |
12ae5dfc | 41 | |
44914417 | 42 | # The microconfiguration. |
43 | ||
2eacba2f | 44 | # Cannot use $$ in the command line itself, so using var expansion instead. |
45 | Config = '$$Config{$$1}' | |
46 | patch_uconfig: | |
47 | $(PERL) -MConfig -pi -e "s/^((?:short|int|long(?:dbl|long)?|ptr|double|[iun]v|u?quad|[iu]\d+|fpos|lseek)(?:size|type)|byteorder|d_quad|quadkind|use64.+)=.*/\\1='"$(Config)"'/g" uconfig.shx | |
48 | ||
535ceeb0 | 49 | regen_uconfig uconfig.h: uconfig.sh |
2f42fcb0 | 50 | $(ENV) CONFIG_SH=uconfig.sh CONFIG_H=uconfig.h sh ./config_h.SH |
12ae5dfc | 51 | |
44914417 | 52 | # Do not regenerate perly.c and perly.h. |
53 | ||
54 | perly.c: perly.y | |
54d0ee51 | 55 | -@echo perly.c is uptodate |
44914417 | 56 | |
57 | perly.h: perly.y | |
54d0ee51 | 58 | -@echo perly.h is uptodate |
44914417 | 59 | |
60 | # The microperl objects. | |
61 | ||
12ae5dfc | 62 | uav$(_O): $(HE) av.c |
4d7c7898 | 63 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) av.c |
12ae5dfc | 64 | |
65 | udeb$(_O): $(HE) deb.c | |
4d7c7898 | 66 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) deb.c |
12ae5dfc | 67 | |
68 | udoio$(_O): $(HE) doio.c | |
4d7c7898 | 69 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) doio.c |
12ae5dfc | 70 | |
71 | udoop$(_O): $(HE) doop.c | |
4d7c7898 | 72 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) doop.c |
12ae5dfc | 73 | |
74 | udump$(_O): $(HE) dump.c regcomp.h regnodes.h | |
4d7c7898 | 75 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) dump.c |
12ae5dfc | 76 | |
77 | uglobals$(_O): $(H) globals.c INTERN.h perlapi.h | |
4d7c7898 | 78 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) globals.c |
12ae5dfc | 79 | |
80 | ugv$(_O): $(HE) gv.c | |
4d7c7898 | 81 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) gv.c |
12ae5dfc | 82 | |
e1a479c5 | 83 | umro$(_O): $(HE) mro.c |
4d7c7898 | 84 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) mro.c |
e1a479c5 | 85 | |
12ae5dfc | 86 | uhv$(_O): $(HE) hv.c |
4d7c7898 | 87 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) hv.c |
12ae5dfc | 88 | |
89 | umg$(_O): $(HE) mg.c | |
4d7c7898 | 90 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) mg.c |
12ae5dfc | 91 | |
92 | uperlmain$(_O): $(HE) miniperlmain.c | |
4d7c7898 | 93 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) miniperlmain.c |
12ae5dfc | 94 | |
95 | uop$(_O): $(HE) op.c keywords.h | |
4d7c7898 | 96 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) -DPERL_EXTERNAL_GLOB op.c |
12ae5dfc | 97 | |
077a72a9 | 98 | ureentr$(_O): $(HE) reentr.c |
4d7c7898 | 99 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) reentr.c |
077a72a9 | 100 | |
530ffa68 | 101 | upad$(_O): $(HE) pad.c |
4d7c7898 | 102 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) pad.c |
530ffa68 | 103 | |
12ae5dfc | 104 | uperl$(_O): $(HE) perl.c |
4d7c7898 | 105 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) perl.c |
12ae5dfc | 106 | |
107 | uperlio$(_O): $(HE) perlio.c | |
4d7c7898 | 108 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) perlio.c |
12ae5dfc | 109 | |
110 | uperly$(_O): $(HE) perly.c | |
4d7c7898 | 111 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) perly.c |
12ae5dfc | 112 | |
113 | upp$(_O): $(HE) pp.c | |
4d7c7898 | 114 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) pp.c |
12ae5dfc | 115 | |
116 | upp_ctl$(_O): $(HE) pp_ctl.c | |
4d7c7898 | 117 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) pp_ctl.c |
12ae5dfc | 118 | |
119 | upp_hot$(_O): $(HE) pp_hot.c | |
4d7c7898 | 120 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) pp_hot.c |
12ae5dfc | 121 | |
122 | upp_sys$(_O): $(HE) pp_sys.c | |
4d7c7898 | 123 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) pp_sys.c |
12ae5dfc | 124 | |
a6ec74c1 | 125 | upp_pack$(_O): $(HE) pp_pack.c |
4d7c7898 | 126 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) pp_pack.c |
a6ec74c1 | 127 | |
84d4ea48 | 128 | upp_sort$(_O): $(HE) pp_sort.c |
4d7c7898 | 129 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) pp_sort.c |
84d4ea48 | 130 | |
12ae5dfc | 131 | uregcomp$(_O): $(HE) regcomp.c regcomp.h regnodes.h INTERN.h |
4d7c7898 | 132 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) regcomp.c |
12ae5dfc | 133 | |
134 | uregexec$(_O): $(HE) regexec.c regcomp.h regnodes.h | |
4d7c7898 | 135 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) regexec.c |
12ae5dfc | 136 | |
137 | urun$(_O): $(HE) run.c | |
4d7c7898 | 138 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) run.c |
12ae5dfc | 139 | |
140 | uscope$(_O): $(HE) scope.c | |
4d7c7898 | 141 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) scope.c |
12ae5dfc | 142 | |
143 | usv$(_O): $(HE) sv.c | |
4d7c7898 | 144 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) sv.c |
12ae5dfc | 145 | |
146 | utaint$(_O): $(HE) taint.c | |
4d7c7898 | 147 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) taint.c |
12ae5dfc | 148 | |
149 | utoke$(_O): $(HE) toke.c keywords.h | |
4d7c7898 | 150 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) toke.c |
12ae5dfc | 151 | |
53a62437 | 152 | ulocale$(_O): $(HE) locale.c |
4d7c7898 | 153 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) locale.c |
53a62437 | 154 | |
155 | unumeric$(_O): $(HE) numeric.c | |
4d7c7898 | 156 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) numeric.c |
53a62437 | 157 | |
7ee2227d | 158 | umathoms$(_O): $(HE) mathoms.c |
4d7c7898 | 159 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) mathoms.c |
7ee2227d | 160 | |
acfe0abc | 161 | uuniversal$(_O): $(HE) universal.c XSUB.h |
4d7c7898 | 162 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) universal.c |
12ae5dfc | 163 | |
164 | uutf8$(_O): $(HE) utf8.c | |
4d7c7898 | 165 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) utf8.c |
12ae5dfc | 166 | |
167 | uutil$(_O): $(HE) util.c | |
4d7c7898 | 168 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) util.c |
12ae5dfc | 169 | |
170 | uperlapi$(_O): $(HE) perlapi.c perlapi.h | |
4d7c7898 | 171 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) perlapi.c |
12ae5dfc | 172 | |
4d7c7898 | 173 | uudmap.h: generate_uudmap$(_X) |
174 | $(RUN) ./generate_uudmap$(_X) >uudmap.h | |
175 | ||
176 | generate_uudmap$(_O): generate_uudmap.c | |
177 | $(CC) $(CCFLAGS) -o $@ $(CFLAGS) generate_uudmap.c | |
178 | ||
179 | generate_uudmap$(_X): generate_uudmap$(_O) | |
180 | $(LD) -o generate_uudmap $(LDFLAGS) generate_uudmap$(_O) $(LIBS) | |
a1055377 | 181 | |
2f42fcb0 | 182 | # That's it, folks! |