Changed to C++
This commit is contained in:
34
Makefile
Normal file
34
Makefile
Normal file
@@ -0,0 +1,34 @@
|
||||
CC = g++
|
||||
CFLAGS = -Wall
|
||||
EXE = DarkRP2D
|
||||
LIB_PATH =
|
||||
INC_PATH =
|
||||
LIBS =
|
||||
|
||||
SRCDIR = src
|
||||
BUILDDIR = build
|
||||
SRC = $(shell C:\\MinGW\\msys\\1.0\\bin\\find $(SRCDIR) -name *.cpp)
|
||||
OBJ = $(patsubst %.cpp, %.o, $(SRC))
|
||||
OBJ := $(subst $(SRCDIR), $(BUILDDIR), $(OBJ))
|
||||
|
||||
.PHONY: all clean build run debug
|
||||
|
||||
all: build $(EXE)
|
||||
|
||||
run: all
|
||||
$(BUILDDIR)/$(EXE)
|
||||
|
||||
$(EXE): $(OBJ)
|
||||
$(CC) $(CFLAGS) -o $(BUILDDIR)/$@ $(OBJ) -static-libgcc -static-libstdc++
|
||||
|
||||
$(OBJ): $(SRC)
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
build:
|
||||
C:\\MinGW\\msys\\1.0\\bin\\mkdir -p $(BUILDDIR)
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILDDIR)
|
||||
|
||||
debug:
|
||||
@echo $(OBJ)
|
||||
Reference in New Issue
Block a user