Rust rewrite
This commit is contained in:
19
dim_plugins/example_c/Makefile
Normal file
19
dim_plugins/example_c/Makefile
Normal file
@@ -0,0 +1,19 @@
|
||||
PLUGIN_NAME=example_c
|
||||
|
||||
|
||||
CC_FLAGS = $(DIM_CC_FLAGS)
|
||||
|
||||
SOURCES=$(wildcard src/*.c)
|
||||
OBJECTS=$(patsubst src/%.c,$(OBJECT_DIR)/$(PLUGIN_NAME)/%.o,$(SOURCES))
|
||||
|
||||
$(info $(SOURCES))
|
||||
|
||||
build: $(PLUGIN_DIR)/$(PLUGIN_NAME).dim
|
||||
|
||||
$(PLUGIN_DIR)/$(PLUGIN_NAME).dim: $(OBJECTS)
|
||||
@mkdir -p $(dir $@)
|
||||
$(DIM_CC) -o $@ $^ $(CC_FLAGS)
|
||||
|
||||
$(OBJECT_DIR)/$(PLUGIN_NAME)/%.o: src/%.c
|
||||
@mkdir -p $(dir $@)
|
||||
$(DIM_CC) -c -o $@ $< -fPIC -pie
|
||||
Reference in New Issue
Block a user