Первая версия (CLI-only) #1
10
Makefile
10
Makefile
@@ -1,5 +1,5 @@
|
||||
APP_NAME := autoattendance
|
||||
SRC_DIR := src
|
||||
SRC_DIR := ./
|
||||
BUILD_DIR := bin
|
||||
CMD_PATH := ./cmd
|
||||
|
||||
@@ -28,11 +28,11 @@ $(shell $(MKDIR) $(BUILD_DIR))
|
||||
all: tidy test build
|
||||
|
||||
build:
|
||||
@cd $(SRC_DIR) && $(GOBUILD) -o ../$(BINARY_NAME) $(CMD_PATH)
|
||||
@cd $(SRC_DIR) && $(GOBUILD) -o $(BINARY_NAME) $(CMD_PATH)
|
||||
@echo "Build complete: $(BINARY_NAME)"
|
||||
|
||||
run: build
|
||||
@./$(BINARY_NAME)
|
||||
@$(BINARY_NAME)
|
||||
|
||||
test:
|
||||
@cd $(SRC_DIR) && $(GOTEST) ./...
|
||||
@@ -50,8 +50,8 @@ help:
|
||||
|
||||
build-linux:
|
||||
@$(MKDIR) $(BUILD_DIR)
|
||||
@cd $(SRC_DIR) && GOOS=linux GOARCH=amd64 $(GOBUILD) -o ../$(BUILD_DIR)/$(APP_NAME)-linux $(CMD_PATH)
|
||||
@cd $(SRC_DIR) && GOOS=linux GOARCH=amd64 $(GOBUILD) -o $(BUILD_DIR)/$(APP_NAME)-linux $(CMD_PATH)
|
||||
|
||||
build-windows:
|
||||
@$(MKDIR) $(BUILD_DIR)
|
||||
@cd $(SRC_DIR) && GOOS=windows GOARCH=amd64 $(GOBUILD) -o ../$(BUILD_DIR)/$(APP_NAME).exe $(CMD_PATH)
|
||||
@cd $(SRC_DIR) && GOOS=windows GOARCH=amd64 $(GOBUILD) -o $(BUILD_DIR)/$(APP_NAME).exe $(CMD_PATH)
|
||||
|
||||
Reference in New Issue
Block a user