From 5f3830d8fdd30aa705749833c1611a8a2db36ac0 Mon Sep 17 00:00:00 2001 From: bigov Date: Sun, 29 Mar 2020 15:19:47 +0900 Subject: [PATCH] fix Makefile for Windows_NT --- example/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/example/Makefile b/example/Makefile index a3ae6f0..7d99d77 100644 --- a/example/Makefile +++ b/example/Makefile @@ -3,9 +3,11 @@ CFLAGS += -std=c99 -pedantic -O2 LIBS := ifeq ($(OS),Windows_NT) -BIN := $(BIN).exe + DEL_BIN = IF EXIST bin DEL /F /Q bin\* + BIN := $(BIN).exe LIBS := -lglfw3 -lopengl32 -lm -lGLU32 -lGLEW32 else + DEL_BIN = rm -rf bin UNAME_S := $(shell uname -s) GLFW3 := $(shell pkg-config --libs glfw3) ifeq ($(UNAME_S),Darwin) @@ -26,7 +28,7 @@ else endif clean: - @rm -rf bin + $(DEL_BIN) file_browser: generate $(CC) $(CFLAGS) -o bin/file_browser file_browser.c $(LIBS)