Skip to content

Instantly share code, notes, and snippets.

View gvanem's full-sized avatar

Gisle Vanem gvanem

View GitHub Profile
@gvanem
gvanem / Makefile.Windows
Last active March 2, 2024 14:29
Python 3.x Makefile for MSVC and clang-cl (x86/x64)
#
# GNU-Makefile for Python 3.x.
#
# Targeting Windows 32 + 64-bits using MSVC-201x or clang-cl.
#
# By G. Vanem <gvanem@yahoo.no> 2015 - 2022.
#
THIS_FILE = Makefile.Windows
DATE := $(shell date +%d-%B-%Y)
@gvanem
gvanem / Makefile.MSVC
Last active February 7, 2024 09:28
A GNU-makefile for Pycurl/MSVC (tired of 'setup.py build' problems on Windows). Put in 'src' directory of Pycurl and do 'make -f Makefile.MSVC clean install'
#
# GNU makefile 4.x for pycurl (MSVC)
#
# By <gvanem@yahoo.no> 2013 - 2024.
#
THIS_FILE := $(firstword $(MAKEFILE_LIST))
DATE := $(shell date +%d-%B-%Y)
YEAR := $(shell date +%Y)
VERSION := 7.45.2
@gvanem
gvanem / enum_adapters.c
Last active January 31, 2024 10:50
A simple program to enumerate the adapters found by Win10Pcap. Ref: https://github.com/SoftEtherVPN/Win10Pcap
/*
* Simple program to enumerate the adapters found by Win10Pcap.
*
* Ref: https://github.com/SoftEtherVPN/Win10Pcap
*
* Put this file in the root directory of Win10Pcap-root and do:
*
* cl -nologo -W3 -Zi -Ot -DWIN32 -DWIN32COM_CPP -MTd -GF -GS -EHsc -RTCs -RTCu -RTCc
* -I./Packet_dll -Fe./enum_adapters.exe enum_adapters.c
* -link -nologo -debug Packet.lib user32.lib ws2_32.lib version.lib
@gvanem
gvanem / Makefile.Windows
Last active January 3, 2024 11:25
A GNU-makefile for LTui (MSCV+clang-cl). Ref: https://github.com/tboox/ltui/
#
# GNUmake Makefile for Ltui (MSVC + clang-cl).
# Ref:
# https://github.com/tboox/ltui.git
#
# G.Vanem <gvanem@yahoo.no>, 2022.
#
TODAY := $(shell date +%d-%B-%Y)
THIS_FILE := Makefile.Windows
PYTHON ?= py -3
@gvanem
gvanem / gist:f54eefad9e84954d390c8bd939ec34ae
Last active December 10, 2023 00:14
GNU-makefile for Hamlib (MSVC+clang-cl)
#
# GNU Makefile for Hamlib (MSVC / clang-cl).
#
# G. Vanem <gvanem@yahoo.no> 2019 - 2023.
#
THIS_FILE := Makefile.Windows
DATE := $(shell date +%d-%B-%Y)
ABI_VER := 4
comma := ,
@gvanem
gvanem / Makefile.Windows
Last active October 6, 2023 09:05
Makefile for curl-impersonate-chrome.exe
#
# Makefile for curl-impersonate-chrome.exe supporting MSVC or clang-cl.
# by Gisle Vanem <gvanem@yahoo.no>
#
# Ref: https://github.com/lwthiker/curl-impersonate.git
#
# Options and roots. Change to suite.
#
CURL_ROOT ?= ..
CARES_ROOT ?= f:/MinGW32/src/inet/DNS/C-ares
@gvanem
gvanem / TESTrun.py
Last active August 29, 2023 10:29
Tcpdump test-script in Python (not any horrid Perl stuff). With colourised output. Put in tcpdump's "tests" directory.
#!/usr/bin/env python
#
# TESTrun.py; my feeble attempt at a Python version of
# the Perl-script 'TESTrun'.
#
# G. Vanem <gisle.vanem@gmail.com> 2015 - 2023.
#
# Reads './TESTLIST' and by default perform all the tcpdump tests specified
# therein (test-spec="*"). Use option '-l' to list them.
#
@gvanem
gvanem / Makefile.Windows
Last active April 26, 2023 22:20
Wget2 stuff for Windows (clang-cl): added 'libwget/mswindows.[ch]' and 'Makefile.Windows'.
#
# GNU Makefile for Wget2 (MSVC and clang-cl).
# 32-bit only.
#
# By <gvanem@yahoo.no> 2015 - 2021.
#
THIS_FILE = Makefile.Windows
THIS_DIR = $(realpath .)
comma := ,
@gvanem
gvanem / Makefile.Windows
Last active April 5, 2023 07:42
GNU-makefile for NPcap's NPF.sys driver
#
# GNU Makefile for the 'NPcap driver'.
# For MSVC + clang-cl, 32/64 bits.
#
# By <gvanem@yahoo.no> 2023.
#
TARGETS := NPcap.sys
THIS_FILE := Makefile.Windows
MAKEFLAGS += --warn-undefined-variables
@gvanem
gvanem / Makefile.Windows
Last active February 16, 2023 10:02
GNU-makefile for Nettle + Hogweed (MSVC/clang-cl, x86/x64)
#
# Nettle + Hogweed Makefile for MSVC and clang-cl.
#
MAJOR_VERSION = 3
MINOR_VERSION = 8
PATCH_VERSION = 0
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION)
MAKEFLAGS += --warn-undefined-variables