Sigrid Solveig Haflínudóttirmake it work on OpenBSD869ee0f3 years agoHistory
111 lines · 2.1 KB · Makefile
RawDownload
 # chugin nameCHUGIN_NAME=Range # all of the c/cpp files that compose this chuginC_MODULES=CXX_MODULES=Range.cpp # where the chuck headers areCK_SRC_PATH?=../chuck/include/  # ---------------------------------------------------------------------------- ## you won't generally need to change anything below this line for a new chugin ## ---------------------------------------------------------------------------- # # default target: print usage message and quitcurrent: 	@echo "[chuck build]: please use one of the following configurations:"	@echo "   make linux, make osx, or make win32" ifneq ($(CK_TARGET),).DEFAULT_GOAL:=$(CK_TARGET)ifeq ($(MAKECMDGOALS),)MAKECMDGOALS:=$(.DEFAULT_GOAL)endifendif .PHONY: osx linux linux-oss linux-jack linux-alsa win32osx linux linux-oss linux-jack linux-alsa: all win32:	make -f makefile.win32 CC?=gccCXX?=g++LD=$(CXX) CHUGIN_PATH=/usr/local/lib/chuck ifneq (,$(strip $(filter osx bin-dist-osx,$(MAKECMDGOALS))))include makefile.osxendif ifneq (,$(strip $(filter linux,$(MAKECMDGOALS))))include makefile.linuxendif ifneq (,$(strip $(filter linux-oss,$(MAKECMDGOALS))))include makefile.linuxendif ifneq (,$(strip $(filter linux-jack,$(MAKECMDGOALS))))include makefile.linuxendif ifneq (,$(strip $(filter linux-alsa,$(MAKECMDGOALS))))include makefile.linuxendif ifneq ($(CHUCK_DEBUG),)FLAGS+= -gelseFLAGS+= -O3endif ifneq ($(CHUCK_STRICT),)FLAGS+= -Werrorendif   # default: build a dynamic chuginCK_CHUGIN_STATIC?=0 ifeq ($(CK_CHUGIN_STATIC),0)SUFFIX=.chugelseSUFFIX=.schugFLAGS+= -D__CK_DLL_STATIC__endif C_OBJECTS=$(addsuffix .o,$(basename $(C_MODULES)))CXX_OBJECTS=$(addsuffix .o,$(basename $(CXX_MODULES))) CHUG=$(addsuffix $(SUFFIX),$(CHUGIN_NAME)) all: $(CHUG) $(CHUG): $(C_OBJECTS) $(CXX_OBJECTS)ifeq ($(CK_CHUGIN_STATIC),0)	$(LD) $(LDFLAGS) -o $@ $^else	ar rv $@ $^	ranlib $@endif $(C_OBJECTS): %.o: %.c	$(CC) $(FLAGS) -c -o $@ $< $(CXX_OBJECTS): %.o: %.cpp $(CK_SRC_PATH)/chuck_dl.h	$(CXX) $(FLAGS) -c -o $@ $< install: $(CHUG)	mkdir -p $(CHUGIN_PATH)	cp $^ $(CHUGIN_PATH)	chmod 755 $(CHUGIN_PATH)/$(CHUG) clean: 	rm -rf $(C_OBJECTS) $(CXX_OBJECTS) $(CHUG) Release Debug 

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t