home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
perl502b.zip
/
OS2
/
makefile.ibm
< prev
next >
Wrap
Makefile
|
1995-05-09
|
3KB
|
93 lines
# MODE=exe: plain EMX exe for fork().
CC = cci
OPTIM = -O -5
# DEBUG = -g
D =
CFLAGS = $(OPTIM) $(DEBUG) -w1 -DSTANDARD_C -DEMBED -DHIDEMYMALLOC -DDOSISH -DOS2=2 -I. -Ios2 $D
LDFLAGS = $(OPTIM) $(DEBUG)
LDLIBS = -lx
TARGETS = perl5i.exe perl5i.dll perl5i.lib
modules = Fcntl GDBM_File SDBM_File POSIX Socket UPM REXXCALL
# mallocobj = malloc$O
obj1 = $(mallocobj) gv$O toke$O perly$O op$O regcomp$O dump$O util$O mg$O
obj2 = hv$O av$O run$O pp_hot$O sv$O pp$O scope$O pp_ctl$O pp_sys$O
obj3 = doop$O doio$O regexec$O taint$O deb$O perl$O os2$O globals$O
objs = $(obj1) $(obj2) $(obj3)
exts = DynaLoader$O
extsx = Socket$O POSIX$O
extsd = DynaLoader$O REXXCALL$O
.IF $(OPTIM) == $(NULL)
SUFFIX = d
CFLAGS += -DDEBUGGING
.ELSE
SUFFIX =
.END
.SOURCE.c : os2 ext/DynaLoader ext/REXXCALL ext/POSIX
.SOURCE$O : ibm$(SUFFIX)
all : config.h preplibrary $(TARGETS) lib/Config.pm modules
mini : miniperl.exe
dbg : perl5d.exe
miniperl.exe miniperl.map .UPDATEALL : miniperlmain$O $(objs)
$(CC) $(LDFLAGS) $< $(LDLIBS) -gm -o $@
perl5i.exe : os2main$O perl5i.lib
$(CC) $(LDFLAGS) $< -o $@
perl5d.exe : os2main2$O $(objs) $(extsd)
$(CC) $(LDFLAGS) $< $(LDLIBS) -gm -o $@
perl5i.dll : $(objs) $(exts) perl5i.def
$(CC) $(LDFLAGS) -Zdll $< $(LDLIBS) -o $@
perl5i.lib : perl5i.def
implib /noign $@ perl5i.def
perl5i.def : os2/perl5hdr.def miniperl.map os2/mkdef.pl
echo LIBRARY 'Perl5ibm' INITINSTANCE TERMINSTANCE >$@
cat os2/perl5hdr.def >> $@
.\miniperl -n os2/mkdef.pl miniperl.map | sort -u - >>$@
preplibrary : miniperl.exe lib/Config.pm config.sh
-mkdir lib/auto
@echo " AutoSplitting perl library"
find lib -name "*.pm" ! -name "REXX.pm" -print >tmp
.\miniperl -Ilib -e "use AutoSplit; autosplit_lib_modules(@ARGV)" @tmp
-$(RM) $(RMFLAGS) tmp
config.h : config.sh
ksh config_h.sh
lib/Config.pm : config.sh miniperl.exe
.\miniperl.exe configpm
os2main2$O : os2main.c
$(CC) $(CFLAGS) -DSTATIC $? -c -o $@
DynaLoader.c .SETDIR=ext/DynaLoader : dl_os2.xs
..\..\miniperl ../../lib/ExtUtils/xsubpp dl_os2.xs > DynaLoader.c
REXXCALL.c .SETDIR=ext/REXXCALL : REXXCALL.xs
..\..\miniperl ../../lib/ExtUtils/xsubpp REXXCALL.xs > REXXCALL.c
POSIX.c .SETDIR=ext/POSIX : POSIX.xs
..\..\miniperl ../../lib/ExtUtils/xsubpp POSIX.xs > DynaLoader.c
modules :
cmd /c "for %x in ($(modules)) do call os2\ext %x"
#############################################################################
install :
-cp -t perl5.exe perl5.dll perl5x.exe os2/h2xs.cmd $(ROOTDIR)/usr/binp
-cp -t perl5.exe $(ROOTDIR)/usr/binp/perl.exe