view makefile.emx @ 928:43a5b3c78c41

Two fixes... the first is on the fly calculation of groupbox border size. This also fixes some initial window issues... because the groupbox border height couldn't be calculated until it was size. So first time we size the groupbox to 100x100 and calculate the border size... then the title calculation also works since it has been sized. Second is the first major update to the layout engine in probably 10 years. The layout engine has now been divided into 3 passes instead of 2. Previously the calculation and layout were done together in the second pass... but this could cause layout to happen before all the box variables were finalized causing occassional layout issues. Now the layout is done separately in a third pass after all the calculation is settled.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 23 Apr 2011 13:05:03 +0000
parents 3ce487327afd
children 3222905690f2
line wrap: on
line source

# $Id$

# Dynamic Windows EMX Makefile

CC = gcc
RM = rm -f
RC = rc
MAKE = make
COMPRESS = lxlite
VER = 11
VERDOT = 1.1

DEFS =
LIBS =

CFLAGS = -O -g -Zomf -Zmt -D__OS2__ -D__ST_MT_ERRNO__ -I. -Wall -o $(@)
LDFLAGS = -Zdll -Zcrtdll
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) -Zcrtdll -Zomf -Zmt -o dwtest.exe dwtest.o -Llib -ldw -ldwcompat dwtest.def

clean:
	$(RM) $(OBJECTS) dwtest.exe

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 dw.dll dwcompat.dll dw.lib dwcompat.lib dw.h