# $Id: makefile.emo,v 1.25 2003/01/11 12:55:10 stas_degteff Exp $
# Makefile for EMX on OS/2 with OMF-Style linkage
# No support for the Husky build environment

CC=	gcc
CFLAGS=	-Wall -Zomf -Zsys
CDEFS=	-D__OS2__
COPT=	-O3 -fomit-frame-pointer -fstrength-reduce -Wall -funsigned-char -s
LIB=	emxomfar
OBJ=	.obj

.SUFFIXES:
.SUFFIXES: .c .obj

TARGET=	smapiemo.lib

include makefile.inc

# Thunderbirds are go!

.c.obj:
	$(CC) $(CFLAGS) $(CDEFS) $(COPT) -c $<

$(TARGET): $(OBJS)
	$(LIB) r $@ $?

clean:
	-cmd /c DEL *.obj

distclean: clean
	-cmd /c DEL $(TARGET)

smapi.dll: $(OBJS)
	echo LIBRARY smapi > smapi.def
	echo EXPORTS >> smapi.def
	emxexp $(OBJS) >> smapi.def
	$(CC) -Zdll -Zcrtdll -Zomf -Zlinker /PM:VIO -o smapi.dll smapi.def $(OBJS)
	emximp -o $(TARGET) smapi.def
#	emximp -o smapiemx.a smapi.def


syntax highlighted by Code2HTML, v. 0.9.1