Mercurial > dwindows
annotate makefile.emx @ 2867:ada74f4d3f39
C++: Implement conditional signal handlers based on overrides.
This uses templates in a sort of hacky way to determine if our virtual
functions have been overridden. Leaving some debug code in for the moment
to make sure it works on all platforms. OS/2 will require using GCC for the
C++ bindings, since VisualAge only supports C++99 and Watcom doesn't even
support that as far as I know.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 17 Dec 2022 21:39:00 +0000 |
parents | 1660b4ecb92f |
children | 4b7c4cd7a11d |
rev | line source |
---|---|
638
3ce487327afd
Support for building binary for OS/2
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
525
diff
changeset
|
1 # $Id$ |
25
f9fd7238635c
Added EMX makefile.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
2 |
26
5e38361f823b
Removed old include directives.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
25
diff
changeset
|
3 # Dynamic Windows EMX Makefile |
25
f9fd7238635c
Added EMX makefile.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
4 |
f9fd7238635c
Added EMX makefile.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
5 CC = gcc |
f9fd7238635c
Added EMX makefile.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
6 RM = rm -f |
f9fd7238635c
Added EMX makefile.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
7 RC = rc |
f9fd7238635c
Added EMX makefile.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
8 MAKE = make |
f9fd7238635c
Added EMX makefile.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
9 COMPRESS = lxlite |
1350
4333b58d879d
Upped the version number to 2.2. Added a Version file to reduce the number of places
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1343
diff
changeset
|
10 include Version |
4333b58d879d
Upped the version number to 2.2. Added a Version file to reduce the number of places
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1343
diff
changeset
|
11 VER = $(DW_MAJOR_VERSION)$(DW_MINOR_VERSION) |
4333b58d879d
Upped the version number to 2.2. Added a Version file to reduce the number of places
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1343
diff
changeset
|
12 VERDOT = $(DW_MAJOR_VERSION).$(DW_MINOR_VERSION) |
1343
d4c874f13e9b
More fixes for OS/2 gcc/gmake. Need to use := to evaluate the $(shell) variable.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1173
diff
changeset
|
13 AVERREV := $(shell os2\svnrev.cmd) |
1173
38e925147a60
Revert to using a file as the source for SVN revision number.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1172
diff
changeset
|
14 include SVN.REV |
25
f9fd7238635c
Added EMX makefile.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
15 |
f9fd7238635c
Added EMX makefile.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
16 DEFS = |
f9fd7238635c
Added EMX makefile.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
17 LIBS = |
f9fd7238635c
Added EMX makefile.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
18 |
1689
3fb7002e4de6
Unicode (UTF-8) mode on OS/2 as noted to me by Alex Taylor comes with
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1604
diff
changeset
|
19 CFLAGS = -O -g -Zomf -Zmt -D__OS2__ -D__ST_MT_ERRNO__ -DUNICODE -DVER_REV=$(VERREV) -I. -Wall -o $(@) |
1165
590740c9c5c6
Experimental change to link with static -lgcc...
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1164
diff
changeset
|
20 LDFLAGS = -Zdll -static-libgcc |
25
f9fd7238635c
Added EMX makefile.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
21 RCFLAGS = -r |
f9fd7238635c
Added EMX makefile.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
22 |
f9fd7238635c
Added EMX makefile.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
23 |
1594
6baf177f335c
Rename compat.c/h dwcompat.c/h and configure option to --with-dwcompat.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1361
diff
changeset
|
24 COMPATOBJECTS = dwcompat.obj dirent.obj |
6baf177f335c
Rename compat.c/h dwcompat.c/h and configure option to --with-dwcompat.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1361
diff
changeset
|
25 COMPATSOURCES = dwcompat.c dirent.c |
25
f9fd7238635c
Added EMX makefile.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
26 |
263
10a34404c825
Add more dependencies.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
174
diff
changeset
|
27 all: dw.dll dwcompat.dll dwtest.exe |
10a34404c825
Add more dependencies.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
174
diff
changeset
|
28 |
1361
324812debcc9
Missed a couple .DEF file references on OS/2 and...
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1360
diff
changeset
|
29 dw.dll: os2\dw.c os2\dw.def |
1360
32a5be18e187
Source tree cleanup, move import/export definition files to their platform folder.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1350
diff
changeset
|
30 $(CC) $(CFLAGS) $(DEFS) -o dw.dll os2/dw.c $(LDFLAGS) os2/dw.def |
263
10a34404c825
Add more dependencies.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
174
diff
changeset
|
31 |
1360
32a5be18e187
Source tree cleanup, move import/export definition files to their platform folder.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1350
diff
changeset
|
32 dw.lib: os2\dw.def |
32a5be18e187
Source tree cleanup, move import/export definition files to their platform folder.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1350
diff
changeset
|
33 emximp -o dw.lib os2\dw.def |
638
3ce487327afd
Support for building binary for OS/2
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
525
diff
changeset
|
34 |
1360
32a5be18e187
Source tree cleanup, move import/export definition files to their platform folder.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1350
diff
changeset
|
35 dwcompat.dll: $(COMPATOBJECTS) os2\dwcompat.def |
32a5be18e187
Source tree cleanup, move import/export definition files to their platform folder.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1350
diff
changeset
|
36 $(CC) $(CFLAGS) $(DEFS) -o dwcompat.dll $(COMPATOBJECTS) $(LDFLAGS) -lsocket os2/dwcompat.def |
25
f9fd7238635c
Added EMX makefile.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
37 |
1360
32a5be18e187
Source tree cleanup, move import/export definition files to their platform folder.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1350
diff
changeset
|
38 dwcompat.lib: os2\dwcompat.def |
32a5be18e187
Source tree cleanup, move import/export definition files to their platform folder.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1350
diff
changeset
|
39 emximp -o dwcompat.lib os2\dwcompat.def |
25
f9fd7238635c
Added EMX makefile.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
40 |
511
80dbd5a1f403
Removed the increments parameter from dw_scrollbar_new().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
288
diff
changeset
|
41 dwtest.exe: dwtest.o dw.lib dwcompat.lib |
1692
6e26c9ead2fe
Fixed a variety of warnings in different compiler/linker combinations on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1689
diff
changeset
|
42 $(CC) $(CFLAGS) -Zomf -Zmt -static-libgcc -Zlinker /pm:pm -o dwtest.exe dwtest.o -Llib -ldw -ldwcompat os2/dwtest.def |
263
10a34404c825
Add more dependencies.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
174
diff
changeset
|
43 |
638
3ce487327afd
Support for building binary for OS/2
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
525
diff
changeset
|
44 clean: |
1343
d4c874f13e9b
More fixes for OS/2 gcc/gmake. Need to use := to evaluate the $(shell) variable.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1173
diff
changeset
|
45 $(RM) *.obj *.o *.lib *.res *~ dwtest.exe dw.dll dwcompat.dll SVN.REV |
263
10a34404c825
Add more dependencies.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
174
diff
changeset
|
46 |
525
2ff26b697877
Fixes for building with Innotek GCC. Will have to check for regressions
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
511
diff
changeset
|
47 dw.obj: dw.c |
25
f9fd7238635c
Added EMX makefile.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
48 $(CC) $(CFLAGS) -c $< |
f9fd7238635c
Added EMX makefile.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
49 |
1594
6baf177f335c
Rename compat.c/h dwcompat.c/h and configure option to --with-dwcompat.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1361
diff
changeset
|
50 dwcompat.obj: dwcompat.c |
263
10a34404c825
Add more dependencies.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
174
diff
changeset
|
51 $(CC) $(CFLAGS) -c $< |
25
f9fd7238635c
Added EMX makefile.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
52 |
525
2ff26b697877
Fixes for building with Innotek GCC. Will have to check for regressions
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
511
diff
changeset
|
53 dirent.obj: os2/dirent.c |
263
10a34404c825
Add more dependencies.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
174
diff
changeset
|
54 $(CC) $(CFLAGS) -c $< |
25
f9fd7238635c
Added EMX makefile.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
55 |
525
2ff26b697877
Fixes for building with Innotek GCC. Will have to check for regressions
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
511
diff
changeset
|
56 dwtest.obj: dwtest.c |
263
10a34404c825
Add more dependencies.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
174
diff
changeset
|
57 $(CC) $(CFLAGS) -c $< |
25
f9fd7238635c
Added EMX makefile.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
58 |
638
3ce487327afd
Support for building binary for OS/2
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
525
diff
changeset
|
59 zip: dw.dll |
2285
5113afb0aea9
OS/2: Fix a typo in that untested commit.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1692
diff
changeset
|
60 cp os2/readme-os2.txt . |
1604
7eb2e2d6b0be
OS/2 and Windows zip rules need to include dwcompat.h.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1595
diff
changeset
|
61 zip dwindows-os2-$(VERDOT).zip readme-os2.txt readme.txt dw.dll dwcompat.dll dw.lib dwcompat.lib dw.h dwcompat.h |