Renamed zenity-clone to icfs-dialogue and improved makefile
This commit is contained in:
36
Makefile
36
Makefile
@@ -2,9 +2,17 @@ SHELL=/bin/bash
|
||||
|
||||
# configurable options
|
||||
|
||||
SOURCES_DIR := ./src
|
||||
TESTS_DIR := ./tests
|
||||
BUILD_DIR := ./build
|
||||
ifndef ($(SOURCES_DIR))
|
||||
SOURCES_DIR := ./src
|
||||
endif
|
||||
|
||||
ifndef ($(TESTS_DIR))
|
||||
TESTS_DIR := ./tests
|
||||
endif
|
||||
|
||||
ifndef ($(BUILD_DIR))
|
||||
BUILD_DIR := ./build
|
||||
endif
|
||||
|
||||
CC := gcc
|
||||
CXX := g++
|
||||
@@ -49,12 +57,18 @@ ifeq ($(TEST), 1)
|
||||
TARGETS += icfs_test
|
||||
endif
|
||||
|
||||
ifneq ($(DIALOGUE), 0)
|
||||
TARGETS += $(BUILD_DIR)/icfs_dialogue
|
||||
endif
|
||||
|
||||
# build!
|
||||
|
||||
default: $(TARGETS)
|
||||
|
||||
.PHONY: clean
|
||||
.PHONY: clean icfs_test clean-icfs clean-icfs_dialogue
|
||||
|
||||
$(BUILD_DIR)/icfs_dialogue:
|
||||
make -C $(SOURCES_DIR)/gui TEST=$(TEST) DEBUG=$(shell realpath $(DEBUG)) SOURCES_DIR=$(shell realpath $(SOURCES_DIR)/gui) BUILD_DIR=$(shell realpath $(BUILD_DIR)) TESTS_DIR=$(shell realpath $(TESTS_DIR))
|
||||
|
||||
$(BUILD_DIR)/icfs: $(BUILD_DIR)/main.o $(BUILD_DIR)/fuse_operations.o $(BUILD_DIR)/sourcefs.o $(BUILD_DIR)/ui-socket.o $(BUILD_DIR)/temp_permissions_table.o $(BUILD_DIR)/perm_permissions_table.o
|
||||
$(CC) $(CFLAGS) $^ $(LDFLAGS) -o $(BUILD_DIR)/icfs
|
||||
@@ -83,6 +97,16 @@ $(BUILD_DIR)/temp_permissions_table.o: $(SOURCES_DIR)/temp_permissions_table.c $
|
||||
$(BUILD_DIR)/perm_permissions_table.o: $(SOURCES_DIR)/perm_permissions_table.c $(SOURCES_DIR)/perm_permissions_table.h
|
||||
$(CC) $(CFLAGS) -c $< $(LDFLAGS) -o $@
|
||||
|
||||
CLEAN_TARGETS=clean-icfs
|
||||
|
||||
clean:
|
||||
rm $(BUILD_DIR)/*.o $(BUILD_DIR)/icfs*
|
||||
ifneq ($(DIALOGUE), 0)
|
||||
CLEAN_TARGETS += clean-icfs_dialogue
|
||||
endif
|
||||
|
||||
clean: $(CLEAN_TARGETS)
|
||||
|
||||
clean-icfs:
|
||||
rm $(BUILD_DIR)/*.o $(BUILD_DIR)/icfs
|
||||
|
||||
clean-icfs_dialogue:
|
||||
make -C $(SOURCES_DIR)/gui clean SOURCES_DIR=$(shell realpath $(SOURCES_DIR)/gui) BUILD_DIR=$(shell realpath $(BUILD_DIR)) TESTS_DIR=$(shell realpath $(TESTS_DIR))
|
||||
|
Reference in New Issue
Block a user