view makefile.emx @ 1305:18a31ab94e3d

Added DW_MENU_AUTO and DW_MENU_POPUP flags that can be passed to dw_menu_append_item() in the id field. On OS/2 and Windows AUTO will automatically allocate a menu ID from the larger static pool of IDs. POPUP will automatically allocate an ID from the smaller pool for transient popup menus. These flags don't do anything on the other platforms since they don't require menu IDs.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 03 Nov 2011 10:09:11 +0000
parents 38e925147a60
children d4c874f13e9b
line wrap: on
line source

# $Id$

# Dynamic Windows EMX Makefile

CC = gcc
RM = rm -f
RC = rc
MAKE = make
COMPRESS = lxlite
VER = 21
VERDOT = 2.1
AVERREV = $(shell os2\svnrev.cmd)
include SVN.REV

DEFS =
LIBS =

CFLAGS = -O -g -Zomf -Zmt -D__OS2__ -D__ST_MT_ERRNO__ -DVER_REV=$(VERREV) -I. -Wall -o $(@)
LDFLAGS = -Zdll -static-libgcc
RCFLAGS = -r


COMPATOBJECTS = compat.obj dirent.obj
COMPATSOURCES = compat.c dirent.c

all: dw.dll dwcompat.dll dwtest.exe

dw.dll:  os2\dw.c dw.def
	$(CC) $(CFLAGS) $(DEFS) -o dw.dll os2/dw.c $(LDFLAGS) dw.def

dw.lib: dw.def
	emximp -o dw.lib dw.def
	copy dw.dll dll
	copy dw.lib lib

dwcompat.dll:  $(COMPATOBJECTS) dwcompat.def
	$(CC) $(CFLAGS) $(DEFS) -o dwcompat.dll $(COMPATOBJECTS) $(LDFLAGS) -lsocket dwcompat.def

dwcompat.lib: dwcompat.def
	emximp -o dwcompat.lib dwcompat.def
	copy dwcompat.dll dll
	copy dwcompat.lib lib

dwtest.exe: dwtest.o dw.lib dwcompat.lib
	$(CC) $(CFLAGS) -Zomf -Zmt -static-libgcc -o dwtest.exe dwtest.o -Llib -ldw -ldwcompat dwtest.def

clean:
	$(RM) $(OBJECTS) dwtest.exe dw.dll dwcompat.dll

dw.obj: dw.c
	$(CC) $(CFLAGS) -c $<	

compat.obj: compat.c
	$(CC) $(CFLAGS) -c $<	

dirent.obj: os2/dirent.c
	$(CC) $(CFLAGS) -c $<	

dwtest.obj: dwtest.c
	$(CC) $(CFLAGS) -c $<	

zip: dw.dll
	copy os2\readme-os2.txt .
	zip dwindows-os2-$(VERDOT).zip readme-os2.txt readme dw.dll dwcompat.dll dw.lib dwcompat.lib dw.h