Skip to content
Snippets Groups Projects
Verified Commit e82c4ec7 authored by raphael.bach's avatar raphael.bach
Browse files

Update Makefile to remove warning when compiling `fmpi_futhark_entry.c`

parent 9e897a8b
No related branches found
No related tags found
No related merge requests found
......@@ -41,8 +41,10 @@ CFLAGS = -Wall -Walloc-zero -Warith-conversion -Warray-bounds=2 \
-funsafe-loop-optimizations -ftrack-macro-expansion=0 -std=c17
ifeq ($(BUILD_MODE),debug)
CFLAGS += -g3 -Og
CFLAGS_FUTHARK += -g3 -Og
else
CFLAGS += -O2 -fstack-protector-all -fstack-protector-strong -DNDEBUG
CFLAGS_FUTHARK += -O2 -DNDEBUG
endif
CFLAGS += -Iinclude $(MPI_INCDIRS)
CPPFLAGS = -MMD -MT $@ -MP -MF build/$(BUILD_MODE)/obj/$*.d
......@@ -64,6 +66,9 @@ all_debug:
all_release:
$(MAKE) all BUILD_MODE=release
build/$(BUILD_MODE)/obj/fmpi_futhark_entry.o: fmpi_futhark_entry.c build/$(BUILD_MODE)/obj/fmpi_futhark_entry.d | build/$(BUILD_MODE)/obj
$(CC) $< -o $@ -c -fPIC $(CFLAGS_FUTHARK) -MMD -MT $@ -MP -MF build/$(BUILD_MODE)/obj/fmpi_futhark_entry.d
build/$(BUILD_MODE)/obj/%.o: %.c build/$(BUILD_MODE)/obj/%.d | build/$(BUILD_MODE)/obj
$(CC) $< -o $@ -c -fPIC $(CFLAGS) $(CPPFLAGS)
......
*.json
*.o
*.pp
as-debug
as-release
as.c
as.h
as.json
main.pp
......@@ -12,9 +12,15 @@ all_debug:
all_release:
$(MAKE) all BUILD_MODE=release
as-$(BUILD_MODE): main.c as.c as.h
as-$(BUILD_MODE): main-$(BUILD_MODE).o as-$(BUILD_MODE).o
$(CC) $^ -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS)
main-$(BUILD_MODE).o: main.c as.h
$(CC) $< -o $@ -c -fPIC $(CFLAGS)
as-$(BUILD_MODE).o: as.c as.h
$(CC) $< -o $@ -c -fPIC $(CFLAGS_FUTHARK)
as.h as.c &: as.fut
futhark c --library $<
......@@ -35,10 +41,14 @@ clean-all: clean-debug clean-release clean-futhark
.PHONY: clean-debug
clean-debug:
rm -f as-debug
rm -f as-debug.o
rm -f main-debug.o
.PHONY: clean-release
clean-release:
rm -f as-release
rm -f as-release.o
rm -f main-release.o
.PHONY: clean-futhark
clean-futhark:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment