Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision dca527be1b77e38047054196fd6a96e8abdae131 authored by ocornut on 18 February 2022, 17:39:29 UTC, committed by ocornut on 18 February 2022, 17:40:43 UTC
Clipper: Assert on extraneous calls to Step(). (#4822) + Demo tweak.
1 parent 29d462e
  • Files
  • Changes
  • 35e2ca0
  • /
  • examples
  • /
  • example_null
  • /
  • Makefile
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:dca527be1b77e38047054196fd6a96e8abdae131
directory badge
swh:1:dir:014a500692e973e8db8a7371b4355b04558e700e
content badge
swh:1:cnt:9ceb353493b18c393c3daeb68f36a9c48f5d1e9f

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
Makefile
#
# Cross Platform Makefile
# Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X
#
# Important: This is a "null backend" application, with no visible output or interaction!
# This is used for testing purpose and continuous integration, and has little use for end-user.
#

# Options
WITH_EXTRA_WARNINGS ?= 0
WITH_FREETYPE ?= 0

EXE = example_null
IMGUI_DIR = ../..
SOURCES = main.cpp
SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
UNAME_S := $(shell uname -s)

CXXFLAGS += -std=c++11 -I$(IMGUI_DIR)
CXXFLAGS += -g -Wall -Wformat
LIBS =

# We use the WITH_EXTRA_WARNINGS flag on our CI setup to eagerly catch zealous warnings
ifeq ($(WITH_EXTRA_WARNINGS), 1)
	CXXFLAGS += -Wno-zero-as-null-pointer-constant -Wno-double-promotion -Wno-variadic-macros
endif

# We use the WITH_FREETYPE flag on our CI setup to test compiling misc/freetype/imgui_freetype.cpp
# (only supported on Linux, and note that the imgui_freetype code currently won't be executed)
ifeq ($(WITH_FREETYPE), 1)
	SOURCES += $(IMGUI_DIR)/misc/freetype/imgui_freetype.cpp
	CXXFLAGS += $(shell pkg-config --cflags freetype2)
	LIBS += $(shell pkg-config --libs freetype2)
endif

##---------------------------------------------------------------------
## BUILD FLAGS PER PLATFORM
##---------------------------------------------------------------------

ifeq ($(UNAME_S), Linux) #LINUX
	ECHO_MESSAGE = "Linux"
	ifeq ($(WITH_EXTRA_WARNINGS), 1)
		CXXFLAGS += -Wextra -Wpedantic
		ifeq ($(shell $(CXX) -v 2>&1 | grep -c "clang version"), 1)
			CXXFLAGS += -Wshadow -Wsign-conversion
		endif
	endif
	CFLAGS = $(CXXFLAGS)
endif

ifeq ($(UNAME_S), Darwin) #APPLE
	ECHO_MESSAGE = "Mac OS X"
	ifeq ($(WITH_EXTRA_WARNINGS), 1)
		CXXFLAGS += -Weverything -Wno-reserved-id-macro -Wno-c++98-compat-pedantic -Wno-padded -Wno-poison-system-directories
	endif
	CFLAGS = $(CXXFLAGS)
endif

ifeq ($(OS), Windows_NT)
	ECHO_MESSAGE = "MinGW"
	ifeq ($(WITH_EXTRA_WARNINGS), 1)
		CXXFLAGS += -Wextra -Wpedantic
	endif
	LIBS += -limm32
	CFLAGS = $(CXXFLAGS)
endif

##---------------------------------------------------------------------
## BUILD RULES
##---------------------------------------------------------------------

%.o:%.cpp
	$(CXX) $(CXXFLAGS) -c -o $@ $<

%.o:$(IMGUI_DIR)/%.cpp
	$(CXX) $(CXXFLAGS) -c -o $@ $<

%.o:$(IMGUI_DIR)/backends/%.cpp
	$(CXX) $(CXXFLAGS) -c -o $@ $<

%.o:$(IMGUI_DIR)/misc/freetype/%.cpp
	$(CXX) $(CXXFLAGS) -c -o $@ $<

all: $(EXE)
	@echo Build complete for $(ECHO_MESSAGE)

$(EXE): $(OBJS)
	$(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)

clean:
	rm -f $(EXE) $(OBJS)
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API