TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Rob Landley
from: Phil Crown
date: 1995-03-17 03:07:20
subject: 32-bit bink hack

RL> Does it come with an EMX make file?  I've spent more time than I'd
 RL> like trying to figure out make files from the docs that come with EMX
 RL> and dmake, and have come to the conclusion that it's not humanly
 RL> possible...

I'm using dmake too, basically here what I do,

CC=gcc
# CFLAGS=-g -Wall -Zomf -Zsys -Zmtd
CFLAGS=-O2 -s -Wall -Zomf -Zmtd -Zsys
DEF_FILE=e:\so\common\generic.def
OBJEXT=obj
SDIR=e:\so\os2\src
# these are all the .obj's required to build your program
OBJS=fm.$(OBJEXT) \
$(SDIR)\inkey.$(OBJEXT) \
$(SDIR)\scrn.$(OBJEXT) \
$(SDIR)\str.$(OBJEXT)

# I don't know what this does
.SUFFIXES: .c .$(OBJEXT) .exe

.c.$(OBJEXT):
        $(CC) $(CFLAGS) -c $<
# very important, above must be a real tab 0x09

fm.exe: 	 $(OBJS) $(DEF_FILE)
        $(CC) $(CFLAGS) -o fm.exe $(OBJS) $(DEF_FILE)
# very important, above must be a real tab 0x09

# these are the dependencies, if any .c or .h file is newer than the obj, it
# will be rebuild the .obj
fm.$(OBJEXT):             fm.c  fm.h  common.h
$(SDIR)\inkey.$(OBJEXT):  $(SDIR)\inkey.c $(SDIR)\inkey.h
$(SDIR)\scrn.$(OBJEXT):   $(SDIR)\scrn.c  $(SDIR)\scrn.h
$(SDIR)\str.$(OBJEXT):    $(SDIR)\str.c   $(SDIR)\str.h


That's all you do, I have about 51 files in my current makefile and have hit
any limits on that aspect of it yet. :-)

Note that the above will place all .obj's in the same directory as the
respective .c source file, I'm trying to find how to get all the .obj's in
to one defined directory, but that is among the least of my problems. :-)

Phil


--- Blue Wave/Max v2.20p OS2 Beta
* Origin: * MacSavvy * Dallas * Mac * OS/2 * (214)250-4479 * (1:124/1208)
SEEN-BY: 105/42 620/243 624/50 711/401 409 410 413 430 807 808 809 934 955
SEEN-BY: 712/407 515 628 704 713/888 800/1 7877/2809
@PATH: 124/1208 1204 1 396/1 270/101 105/103 42 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.