Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
105 lines (85 sloc) 2.63 KB
# $Id: mk_os2.mak 74 2002-01-27 21:20:55Z darren $
# A Makefile for OS/2 using EMX/gcc
# You may want to use the OS/2 port of autoconf for building
# and comment-out the according statements in this Makefile.
# You need a library to provide regex support.
# libExt might do this, but currently (2/2001) it doesn't work well
# together with ctags ...
# Provided and supported by
# Alexander Mai
# <> or <>
@echo "Enter $(MAKE) -f mk_os2.mak target"
@echo "where target is one of:"
@echo " small (small executable req. EMX runtime)"
@echo " debug (executable for debugging purposes)"
@echo " release (stand-alone executable)"
@echo " clean (remove all files built)"
# Use this to create a small binary
# (requires EMX runtime libraries)
$(MAKE) -f mk_os2.mak all \
CC="gcc" \
CFLAGS="-O5 -mpentium -Wall" \
LFLAGS="-Zcrtdll -s" \
LIBS="-lregex" \
# Use this to create a binary for debugging purposes
# (requires EMX runtime libraries)
$(MAKE) -f mk_os2.mak all \
CC="gcc" \
CFLAGS="-O0 -Wall -g" \
LFLAGS="-Zcrtdll -g" \
LIBS="-lregex" \
# Use this to create a stand-alone binary for distribution
# (requires link386 for linking but no EMX runtime libraries)
$(MAKE) -f mk_os2.mak all \
CC="gcc" \
CFLAGS="-g -O5 -mpentium -Wall" \
LFLAGS="-s -Zomf -Zsys -Zlinker /PM:VIO" \
LIBS="-lregex" \
# Use the line below if you have created config.h
# (manually or by running configure)
# Otherwise use built-in defaults (#ifdef OS2)!
# General rules and definitions
.SUFFIXES: .c .exe .h .o .obj
include source.mak
all: ctags.exe readtags.exe readtags.a readtags.lib
ctags: ctags.exe
etags: etags.exe
ctags.exe: $(OBJECTS)
$(CC) $(CFLAGS) $(LFLAGS) -o $@ $^ $(LIBS)
etags.exe: ctags.exe
@copy $< $@
# The readtags executable
readtags.exe: readtags.c
# We build a.out and omf version of the readtags library
readtags.o: readtags.c
$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $^
readtags.a: readtags.o
if exist $@ del $@
ar rc $@ $^
readtags.lib: readtags.a
emxomf $<
$(CC) $(CFLAGS) $(DEFINES) -I. -c $< -o $@
$(CC) $(CFLAGS) -Zomf $(DEFINES) -I. -c $< -o $@
# Delete all files that are not part of the source distribution
@if exist ctags.exe del ctags.exe
@if exist etags.exe del etags.exe
@if exist readtags.exe del readtags.exe
@if exist readtags.a del readtags.a
@if exist readtags.lib del readtags.lib
@if exist *.obj del *.obj
@if exist *.o del *.o