aboutsummaryrefslogtreecommitdiff
path: root/rules.mk
diff options
context:
space:
mode:
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk21
1 files changed, 9 insertions, 12 deletions
diff --git a/rules.mk b/rules.mk
index d4c7bf9..f01c791 100644
--- a/rules.mk
+++ b/rules.mk
@@ -13,7 +13,7 @@ debug: CINIT :=
debug: CFINI :=
debug: targets
-release: CFLAGS += -O3 -mtune=native -flto -ffast-math #-DNDEBUG
+release: CFLAGS += -O2 -mtune=native -flto -ffast-math #-DNDEBUG
release: targets
# Targets & array of sources & intermediates
@@ -23,17 +23,14 @@ DEPS :=
LIBS :=
BINS :=
-UNTS :=
+TEST :=
GENS :=
# Iterate through directory tree
-DIR := sys
+DIR := src
include $(DIR)/rules.mk
-# DIR := src
-# include $(DIR)/rules.mk
-
# Generic rules
%.a: %.o
$(ARCHIVE)
@@ -41,16 +38,16 @@ include $(DIR)/rules.mk
%: %.o
$(LINK)
-$(OBJ_DIR)/%.o: %.c
+$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c
$(COMPILE)
-$(OBJ_DIR)/%.o: %.s
+$(OBJ_DIR)/%.o: $(SRC_DIR)/%.s
$(ASSEMBLE)
-$(OBJ_DIR)/%: %.c
+$(OBJ_DIR)/%: $(SRC_DIR)%.c
$(COMPLNK)
-targets: $(LIBS) $(BINS) $(UNTS)
+targets: $(LIBS) $(BINS) $(TEST)
clean:
@echo removing object files
@@ -64,7 +61,7 @@ clean:
@echo removing binaries
@rm -f $(BINS)
@echo removing unit tests
- @rm -f $(UNTS)
+ @rm -f $(TEST)
install: targets
@echo installing executables
@@ -76,7 +73,7 @@ install: targets
install $(LIBS) $(LIB_DIR); \
fi
@echo installing terminfo
- @tic -sx sys/cmd/term/term.info
+ @tic -sx cmd/term/term.info
database:
compiledb make -j4