Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile.mk: portable Makefile.m32 #9764

Closed
wants to merge 58 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
4ed3ab2
Makefile.m32: include common logic first
vszakats Oct 17, 2022
4f2cd4b
include common logic first 2
vszakats Oct 17, 2022
26536a7
introduce TRIPLET, keep ARCH for compatibility
vszakats Oct 17, 2022
e7d805d
detect WIN32 from triplet
vszakats Oct 17, 2022
cdfdf46
tidy-up / reorder
vszakats Oct 17, 2022
ed18fe2
fence WIN32-specific parts
vszakats Oct 17, 2022
a874a94
build examples without intermediate .o output
vszakats Oct 17, 2022
e822689
move lib/src objects into a subdir
vszakats Oct 17, 2022
7e9a6b7
detect MS-DOS
vszakats Oct 17, 2022
5f15d13
include config-dos.h automatically
vszakats Oct 17, 2022
d7ae5a6
tidy-up / reorder
vszakats Oct 17, 2022
51eedb5
lib/Makefile.m32: set ZLIB if we have zlib
vszakats Oct 17, 2022
256aa42
config-dos.h: always define USE_MANUAL
vszakats Oct 17, 2022
d89efdd
lib/config-dos.h: delete deprecated USE_ZLIB
vszakats Oct 17, 2022
d9afdb1
compile hugehelp if a roff tool is present
vszakats Oct 17, 2022
73bfe05
make exe extension a parameter
vszakats Oct 17, 2022
d82af9f
add amiga support
vszakats Oct 17, 2022
1c17011
add cross-tools links for msdos and amiga
vszakats Oct 17, 2022
6766582
reorder
vszakats Oct 19, 2022
d8a0dc1
regen hugehelp in raw repos only
vszakats Oct 19, 2022
da2b260
keep WATT_ROOT for compat, add WATT_PATH
vszakats Oct 19, 2022
4a6daa1
replace FIXME with comment
vszakats Oct 19, 2022
22a6db4
showcase portable options in CFG example
vszakats Oct 19, 2022
cf176d1
make description platform agnostic
vszakats Oct 19, 2022
92adf46
delete amiga flag not universally required
vszakats Oct 19, 2022
d9c8e68
tidy-up / reorder
vszakats Oct 19, 2022
8e827bc
add link to AmiTCP SDK
vszakats Oct 23, 2022
a27638b
Makefile.dist: fix DJGPP build on hosts with case-sensitive filesystems
vszakats Oct 23, 2022
a2661aa
Makefile.dist: use -C option with Amiga too
vszakats Oct 23, 2022
4aff17d
Makefile.dist: support MAKE variable with Amiga
vszakats Oct 23, 2022
19f8915
msdos: replace DJGPP-specific make files with Makefile.m32
vszakats Oct 23, 2022
bde90c3
amiga: replace amiga-specific make files with Makefile.m32
vszakats Oct 23, 2022
d757494
set CURL_NO_OLDIES when building examples (like autotools do)
vszakats Oct 24, 2022
78f5567
fix DYN value when building examples
vszakats Oct 24, 2022
862604f
default CC to gcc by default
vszakats Oct 24, 2022
97204e9
rename Makefile.m32 to Makefile.mk
vszakats Oct 24, 2022
1559aaf
add support for -map CFG option
vszakats Oct 25, 2022
865c8d0
add support for -debug and -trackmem CFG options
vszakats Oct 25, 2022
dfb0aee
move compatibility/deprecated settings into their own section
vszakats Oct 25, 2022
c6fdb6f
better WATT_ROOT compatibility by applying realpath
vszakats Oct 25, 2022
1a24b03
understand makefile.dj settings for compatibility
vszakats Oct 25, 2022
25126a3
lib/config-*: allow setting the OS string via `-DOS=platform`
vszakats Oct 25, 2022
0510da6
set OS to the TRIPLET, if latter is set or auto-detected
vszakats Oct 25, 2022
fb54adb
Revert "understand makefile.dj settings for compatibility"
vszakats Oct 26, 2022
9311dbb
Makefile.dist: auto-fill CFG for djgpp and amiga
vszakats Nov 11, 2022
fe90037
INSTALL.md: sync mingw32 LDAPS instructions with recent changes
vszakats Nov 11, 2022
59dfc1b
INSTALL.md: add MS-DOS and AmigaOS sections
vszakats Nov 11, 2022
07adb54
watt option is mandatory for MS-DOS
vszakats Nov 11, 2022
99dafe1
replace deprecated WATT_ROOT with WATT_PATH in docs
vszakats Nov 11, 2022
08ebea6
use realistic watt path in example
vszakats Nov 11, 2022
7d96256
INSTALL.md: fix spellcheck errors, md cleanups
vszakats Nov 12, 2022
ed1a48b
fix auto-enabling watt for MS-DOS
vszakats Nov 12, 2022
d7ca83e
do not set the OS value automatically
vszakats Nov 12, 2022
fefefaa
move watt config after its dependents
vszakats Nov 12, 2022
307c1eb
zlib: use standard header and lib paths
vszakats Nov 12, 2022
39ea006
doc cleanups
vszakats Nov 13, 2022
560053b
src: fix -map option for non-windows
vszakats Nov 14, 2022
1526eaf
add support for ZLIB_LIBS
vszakats Nov 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/scripts/spellcheck.words
Expand Up @@ -160,6 +160,7 @@ dir
distro
distro's
distros
DJGPP
dlist
DLL
dll
Expand Down Expand Up @@ -226,6 +227,7 @@ FreeDOS
FreeRTOS
freshmeat
Frexx
FS
fseek
FTPing
fuzzer
Expand Down
34 changes: 17 additions & 17 deletions Makefile.dist
Expand Up @@ -31,25 +31,25 @@ ssl:
make

mingw32:
$(MAKE) -C lib -f Makefile.m32
$(MAKE) -C src -f Makefile.m32
$(MAKE) -C lib -f Makefile.mk
$(MAKE) -C src -f Makefile.mk

mingw32-clean:
$(MAKE) -C lib -f Makefile.m32 clean
$(MAKE) -C src -f Makefile.m32 clean
$(MAKE) -C docs/examples -f Makefile.m32 clean
$(MAKE) -C lib -f Makefile.mk clean
$(MAKE) -C src -f Makefile.mk clean
$(MAKE) -C docs/examples -f Makefile.mk clean

mingw32-vclean mingw32-distclean:
$(MAKE) -C lib -f Makefile.m32 vclean
$(MAKE) -C src -f Makefile.m32 vclean
$(MAKE) -C docs/examples -f Makefile.m32 vclean
$(MAKE) -C lib -f Makefile.mk vclean
$(MAKE) -C src -f Makefile.mk vclean
$(MAKE) -C docs/examples -f Makefile.mk vclean

mingw32-examples%:
$(MAKE) -C docs/examples -f Makefile.m32 CFG=$@
$(MAKE) -C docs/examples -f Makefile.mk CFG=$@

mingw32%:
$(MAKE) -C lib -f Makefile.m32 CFG=$@
$(MAKE) -C src -f Makefile.m32 CFG=$@
$(MAKE) -C lib -f Makefile.mk CFG=$@
$(MAKE) -C src -f Makefile.mk CFG=$@

vc:
cd winbuild
Expand All @@ -59,9 +59,9 @@ vc-x64:
cd winbuild
nmake /f Makefile.vc MACHINE=x64

djgpp:
$(MAKE) -C lib -f Makefile.dj
$(MAKE) -C src -f Makefile.dj
djgpp%:
$(MAKE) -C lib -f Makefile.mk CFG=$@ CROSSPREFIX=i586-pc-msdosdjgpp-
$(MAKE) -C src -f Makefile.mk CFG=$@ CROSSPREFIX=i586-pc-msdosdjgpp-

cygwin:
./configure
Expand All @@ -71,9 +71,9 @@ cygwin-ssl:
./configure --with-openssl
make

amiga:
cd ./lib && make -f makefile.amiga
cd ./src && make -f makefile.amiga
amiga%:
$(MAKE) -C lib -f Makefile.mk CFG=$@ CROSSPREFIX=m68k-amigaos-
$(MAKE) -C src -f Makefile.mk CFG=$@ CROSSPREFIX=m68k-amigaos-

unix: all

Expand Down
28 changes: 26 additions & 2 deletions docs/INSTALL.md
Expand Up @@ -182,7 +182,7 @@ make targets available to build libcurl with more features, use:
and SSPI support.

If you have any problems linking libraries or finding header files, be sure
to verify that the provided `Makefile.m32` files use the proper paths, and
to verify that the provided `Makefile.mk` files use the proper paths, and
adjust as necessary. It is also possible to override these paths with
environment variables, for example:

Expand Down Expand Up @@ -210,7 +210,7 @@ set LDFLAGS=-Lc:/openldapsdk/lib/mscvc
set LIBS=-lldapsdk -lldapssl -lldapx
```

If you want to enable LDAPS support then set LDAPS=1.
If you want to enable LDAPS support then append `-ldaps` to the make target.

## Cygwin

Expand All @@ -220,6 +220,30 @@ executable in `/bin/` or you will see the configure fail toward the end.

Run `make`

## MS-DOS

Requires DJGPP in the search path and pointing to the Watt-32 stack via
`WATT_PATH=c:/djgpp/net/watt`.

Run `make -f Makefile.dist djgpp` in the root curl dir.

For build configuration options, please see the MinGW32 section.

Notes:

- DJGPP 2.04 beta has a `sscanf()` bug so the URL parsing is not done
properly. Use DJGPP 2.03 until they fix it.

- Compile Watt-32 (and OpenSSL) with the same version of DJGPP. Otherwise
things go wrong because things like FS-extensions and `errno` values have
been changed between releases.

## AmigaOS

Run `make -f Makefile.dist amiga` in the root curl dir.

For build configuration options, please see the MinGW32 section.

## Disabling Specific Protocols in Windows builds

The configure utility, unfortunately, is not available for the Windows
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/Makefile.am
Expand Up @@ -24,8 +24,8 @@

AUTOMAKE_OPTIONS = foreign nostdinc

EXTRA_DIST = README.md Makefile.example Makefile.inc Makefile.m32 \
makefile.dj $(COMPLICATED_EXAMPLES) .checksrc
EXTRA_DIST = README.md Makefile.example Makefile.inc Makefile.mk \
$(COMPLICATED_EXAMPLES) .checksrc

# Specify our include paths here, and do it relative to $(top_srcdir) and
# $(top_builddir), to ensure that these paths which belong to the library
Expand Down
38 changes: 27 additions & 11 deletions docs/examples/Makefile.m32 → docs/examples/Makefile.mk
Expand Up @@ -22,37 +22,53 @@
#
#***************************************************************************

# Build libcurl via lib/Makefile.m32 first.
# Build libcurl via lib/Makefile.mk first.

PROOT := ../..

ifeq ($(findstring -static,$(CFG)),)
DYN := 1
endif

### Common

include $(PROOT)/lib/Makefile.mk

### Local

CPPFLAGS += -DCURL_NO_OLDIES
LDFLAGS += -L$(PROOT)/lib
LIBS += -lcurl
LIBS := -lcurl $(LIBS)

ifeq ($(findstring -static,$(CFG)),)
ifdef DYN
curl_DEPENDENCIES += $(PROOT)/lib/libcurl.dll.a
DYN := 1
else
curl_DEPENDENCIES := $(PROOT)/lib/libcurl.a
ifdef WIN32
CPPFLAGS += -DCURL_STATICLIB
LDFLAGS += -static
endif
endif

ifdef WIN32
LIBS += -lws2_32
endif

### Sources and targets

# Provides check_PROGRAMS
include Makefile.inc

TARGETS := $(patsubst %,%.exe,$(strip $(check_PROGRAMS) synctime))
TOCLEAN := $(TARGETS:.exe=.o)
ifdef WIN32
check_PROGRAMS += synctime
endif

### Local rules
TARGETS := $(patsubst %,%$(BIN_EXT),$(strip $(check_PROGRAMS)))
TOCLEAN := $(TARGETS)

%.exe: %.o $(curl_DEPENDENCIES)
$(CC) $(LDFLAGS) $(CURL_LDFLAGS_BIN) -o $@ $< $(LIBS)
### Rules

### Global script
%$(BIN_EXT): %.c $(curl_DEPENDENCIES)
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(CURL_LDFLAGS_BIN) $< -o $@ $(LIBS)

include $(PROOT)/lib/Makefile.m32
all: $(TARGETS)
57 changes: 0 additions & 57 deletions docs/examples/makefile.dj

This file was deleted.

6 changes: 3 additions & 3 deletions lib/Makefile.am
Expand Up @@ -25,9 +25,9 @@ AUTOMAKE_OPTIONS = foreign nostdinc

CMAKE_DIST = CMakeLists.txt curl_config.h.cmake

EXTRA_DIST = Makefile.m32 config-win32.h config-win32ce.h config-plan9.h \
config-riscos.h config-mac.h curl_config.h.in makefile.dj config-dos.h \
libcurl.plist libcurl.rc config-amigaos.h makefile.amiga config-win32ce.h \
EXTRA_DIST = Makefile.mk config-win32.h config-win32ce.h config-plan9.h \
config-riscos.h config-mac.h curl_config.h.in config-dos.h \
libcurl.plist libcurl.rc config-amigaos.h config-win32ce.h \
config-os400.h setup-os400.h $(CMAKE_DIST) setup-win32.h .checksrc

lib_LTLIBRARIES = libcurl.la
Expand Down