1 # $Id: mk_os2.mak 74 2002-01-27 21:20:55Z darren $
3 # A Makefile for OS/2 using EMX/gcc
4 # You may want to use the OS/2 port of autoconf for building
5 # and comment-out the according statements in this Makefile.
6 # You need a library to provide regex support.
7 # libExt might do this, but currently (2/2001) it doesn't work well
8 # together with ctags ...
10 # Provided and supported by
12 # <st002279@hrzpub.tu-darmstadt.de> or <amai@users.sf.net>
15 @echo
"Enter $(MAKE) -f mk_os2.mak target"
16 @echo
"where target is one of:"
17 @echo
" small (small executable req. EMX runtime)"
18 @echo
" debug (executable for debugging purposes)"
19 @echo
" release (stand-alone executable)"
20 @echo
" clean (remove all files built)"
22 # Use this to create a small binary
23 # (requires EMX runtime libraries)
25 $(MAKE
) -f mk_os2.mak
all \
27 CFLAGS
="-O5 -mpentium -Wall" \
28 LFLAGS
="-Zcrtdll -s" \
32 # Use this to create a binary for debugging purposes
33 # (requires EMX runtime libraries)
35 $(MAKE
) -f mk_os2.mak
all \
37 CFLAGS
="-O0 -Wall -g" \
38 LFLAGS
="-Zcrtdll -g" \
42 # Use this to create a stand-alone binary for distribution
43 # (requires link386 for linking but no EMX runtime libraries)
45 $(MAKE
) -f mk_os2.mak
all \
47 CFLAGS
="-g -O5 -mpentium -Wall" \
48 LFLAGS
="-s -Zomf -Zsys -Zlinker /PM:VIO" \
52 # Use the line below if you have created config.h
53 # (manually or by running configure)
54 # Otherwise use built-in defaults (#ifdef OS2)!
55 # DEFINES=-DHAVE_CONFIG_H
59 # General rules and definitions
61 .SUFFIXES
: .c .exe .h .o .obj
65 all: ctags.exe readtags.exe readtags.a readtags.lib
70 $(CC
) $(CFLAGS
) $(LFLAGS
) -o
$@
$^
$(LIBS
)
75 # The readtags executable
76 readtags.exe
: readtags.c
77 $(CC
) $(CFLAGS
) $(DEFINES
) $(LFLAGS
) -DREADTAGS_MAIN
-o
$@
$^
$(LIBS
)
79 # We build a.out and omf version of the readtags library
80 readtags.o
: readtags.c
81 $(CC
) $(CFLAGS
) $(DEFINES
) -c
-o
$@
$^
83 readtags.a
: readtags.o
87 readtags.lib
: readtags.a
91 $(CC
) $(CFLAGS
) $(DEFINES
) -I.
-c
$< -o
$@
94 $(CC
) $(CFLAGS
) -Zomf
$(DEFINES
) -I.
-c
$< -o
$@
96 # Delete all files that are not part of the source distribution
98 @if exist ctags.exe del ctags.exe
99 @if exist etags.exe del etags.exe
100 @if exist readtags.exe del readtags.exe
101 @if exist readtags.a del readtags.a
102 @if exist readtags.lib del readtags.lib
103 @if exist
*.obj del
*.obj
104 @if exist
*.o del
*.o