A quick and dirty shell implementation for A.U.TH. (Operating systems Lab)
25개 이상의 토픽을 선택하실 수 없습니다.
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #
- # Snel makefile
- #
- # Author: Christos Choutouridis AEM:8997
- # email: cchoutou@ece.auth.gr
- #
-
- CXX := -c++
- CXXFLAGS := -std=c++14 -Wall -Wextra -Werror
- LDFLAGS := -lstdc++
- BUILD := ./bin
- OBJ_DIR := $(BUILD)/obj
- APP_DIR := $(BUILD)
- TARGET := snel
- SRC := $(wildcard src/*.cpp)
-
- OBJECTS := $(SRC:%.cpp=$(OBJ_DIR)/%.o)
-
- $(OBJ_DIR)/%.o: %.cpp
- @mkdir -p $(@D)
- $(CXX) $(CXXFLAGS) -o $@ -c $<
-
- $(APP_DIR)/$(TARGET): $(OBJECTS)
- @mkdir -p $(@D)
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(APP_DIR)/$(TARGET) $(OBJECTS)
-
- # === Rules ===
- snel: build $(APP_DIR)/$(TARGET)
-
- build:
- @mkdir -p $(APP_DIR)
- @mkdir -p $(OBJ_DIR)
-
- debug: CXXFLAGS += -DDEBUG -g3
- debug: snel
-
- release: CXXFLAGS += -O2
- release: snel
-
- all: release
-
- clean:
- -@rm -rvf $(OBJ_DIR)/*
- -@rm -rvf $(APP_DIR)/*
-
- .PHONY: snel build debug release all clean
-
|