You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and dots ('.'), can be up to 35 characters long. Letters must be lowercase.
		
		
		
		
		
			
		
			
				
					
					
						
							59 lines
						
					
					
						
							1.3 KiB
						
					
					
				
			
		
		
	
	
							59 lines
						
					
					
						
							1.3 KiB
						
					
					
				# | 
						|
# Cross Platform Makefile | 
						|
# Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X | 
						|
# | 
						|
 | 
						|
EXE = example_null | 
						|
SOURCES = main.cpp | 
						|
SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp ../../imgui_widgets.cpp | 
						|
OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) | 
						|
UNAME_S := $(shell uname -s) | 
						|
 | 
						|
CXXFLAGS = -I../ -I../../ | 
						|
CXXFLAGS += -g -Wall -Wformat | 
						|
LIBS = | 
						|
 | 
						|
##--------------------------------------------------------------------- | 
						|
## BUILD FLAGS PER PLATFORM | 
						|
##--------------------------------------------------------------------- | 
						|
 | 
						|
ifeq ($(UNAME_S), Linux) #LINUX | 
						|
	ECHO_MESSAGE = "Linux" | 
						|
	CFLAGS = $(CXXFLAGS) | 
						|
endif | 
						|
 | 
						|
ifeq ($(UNAME_S), Darwin) #APPLE | 
						|
	ECHO_MESSAGE = "Mac OS X" | 
						|
	CFLAGS = $(CXXFLAGS) | 
						|
endif | 
						|
 | 
						|
ifeq ($(findstring MINGW,$(UNAME_S)),MINGW) | 
						|
	ECHO_MESSAGE = "MinGW" | 
						|
	CFLAGS = $(CXXFLAGS) | 
						|
endif | 
						|
 | 
						|
##--------------------------------------------------------------------- | 
						|
## BUILD RULES | 
						|
##--------------------------------------------------------------------- | 
						|
 | 
						|
%.o:%.cpp | 
						|
	$(CXX) $(CXXFLAGS) -c -o $@ $< | 
						|
 | 
						|
%.o:../%.cpp | 
						|
	$(CXX) $(CXXFLAGS) -c -o $@ $< | 
						|
 | 
						|
%.o:../../%.cpp | 
						|
	$(CXX) $(CXXFLAGS) -c -o $@ $< | 
						|
 | 
						|
%.o:../libs/gl3w/GL/%.c | 
						|
# %.o:../libs/glad/src/%.c | 
						|
	$(CC) $(CFLAGS) -c -o $@ $< | 
						|
 | 
						|
all: $(EXE) | 
						|
	@echo Build complete for $(ECHO_MESSAGE) | 
						|
 | 
						|
$(EXE): $(OBJS) | 
						|
	$(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) | 
						|
 | 
						|
clean: | 
						|
	rm -f $(EXE) $(OBJS)
 | 
						|
 |