Hi team
First time writing Makefile here in Windows environment. How can I put a backslash in the following code:
This is my full makefile (so far):
First time writing Makefile here in Windows environment. How can I put a backslash in the following code:
Bash:
# under windows this one output: .\src/main.c
_SOURCE_FILES := $(wildcard $(FOLDER_SOURCE)/*.c)
# this one won't work
# trying to be like this: .\src\main.c
_SOURCE_FILES := $(wildcard $(FOLDER_SOURCE)\*.c)
Bash:
CC := gcc
FLAGS := -Wall -std=c99
# name of the final program
TARGET_EXEC := final_program
# source files folder
FOLDER_SOURCE := .\src
# header files folder
FOLDER_INCLUDE := .\src
# object files folder
FOLDER_OBJECT := .\obj
# output files folder
FOLDER_BIN := .\bin
# under windows this one output: .\src/main.c
_SOURCE_FILES := $(wildcard $(FOLDER_SOURCE)/*.c)
# this one won't work
# tryint to be like this: .\src\main.c
# _SOURCE_FILES := $(wildcard $(FOLDER_SOURCE)\*.c)
# replace forward slash with back slash
#SOURCE_FILES := $(subst /,\,$(_SOURCE_FILES))
$(TARGET_EXEC):
@echo $(_SOURCE_FILES)
# @echo $(SOURCE_FILES)
.DELETE_ON_ERROR: