Skip to content

Commit

Permalink
Makefile reorg and site update
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Sep 20, 2024
1 parent 4ac167d commit 250570f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .settings/language.settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="533368308517884254" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser" keep-relative-paths="false" name="CDT GCC Build Output Parser" parameter="([^/\\\\]*)((g?cc)|([gc]\+\+)|(clang))" prefer-non-shared="true"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="533476417727484254" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ prior to invoking `make`. The following build variables can be configured:
- `CFLAGS`: Flags to pass onto the C compiler (default: `-Os -Wall -std=c99`). Note, `-Iinclude` will be added
automatically.

- `LDFLAGS`: Linker flags (default is `-lm`). Note, `-lxchange` will be added automatically.
- `LDFLAGS`: Extra linker flags (default is _not set_). Note, `-lm -lxchange` will be added automatically.

- `BUILD_MODE`: You can set it to `debug` to enable debugging features: it will initialize the global `xDebug`
variable to `TRUE` and add `-g` to `CFLAGS`.
Expand Down
24 changes: 12 additions & 12 deletions config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,8 @@ CFLAGS ?= -Os -Wall -std=c99
# Extra warnings (not supported on all compilers)
#CFLAGS += -Wextra

# Link against math libs (for e.g. isnan())
LDFLAGS ?= -lm

# Compile and link against a specific xchange library (if defined)
ifdef XCHANGE
CPPFLAGS += -I$(XCHANGE)/include
LDFLAGS += -L$(XCHANGE)/lib
LD_LIBRARY_PATH = $(XCHANGE)/lib:$(LD_LIBRARY_PATH)
endif

# Always link against the xchange lib.
LDFLAGS += -lxchange
# Extra linker flags (if any)
#LDFLAGS=

# cppcheck options for 'check' target
CHECKOPTS ?= --enable=performance,warning,portability,style --language=c \
Expand All @@ -68,6 +58,16 @@ ifeq ($(BUILD_MODE),debug)
CFLAGS += -g -DDEBUG
endif

# Link against math libs (for e.g. isnan()), and xchange dependency
LDFLAGS += -lm -lxchange

# Compile and link against a specific xchange library (if defined)
ifdef XCHANGE
CPPFLAGS += -I$(XCHANGE)/include
LDFLAGS += -L$(XCHANGE)/lib
LD_LIBRARY_PATH = $(XCHANGE)/lib:$(LD_LIBRARY_PATH)
endif

# Search for files in the designated locations
vpath %.h $(INC)
vpath %.c $(SRC)
Expand Down

0 comments on commit 250570f

Please sign in to comment.