Browse Source

Rearrange makefiles

tags/v0.6.0
Andrew Belt 6 years ago
parent
commit
b738fe22f4
2 changed files with 16 additions and 9 deletions
  1. +15
    -8
      Makefile
  2. +1
    -1
      compile.mk

+ 15
- 8
Makefile View File

@@ -9,11 +9,13 @@ ifdef RELEASE
FLAGS += -DRELEASE=$(RELEASE) FLAGS += -DRELEASE=$(RELEASE)
endif endif


SOURCES += $(wildcard src/*.cpp src/*/*.cpp)
SOURCES += dep/nanovg/src/nanovg.c
include arch.mk




include arch.mk
# Sources and build flags

SOURCES += $(wildcard src/*.cpp src/*/*.cpp)
SOURCES += dep/nanovg/src/nanovg.c


ifeq ($(ARCH), lin) ifeq ($(ARCH), lin)
SOURCES += dep/osdialog/osdialog_gtk2.c SOURCES += dep/osdialog/osdialog_gtk2.c
@@ -47,7 +49,9 @@ ifeq ($(ARCH), win)
endif endif




all: $(TARGET)
# Convenience targets

all: dep $(TARGET)


dep: dep:
$(MAKE) -C dep $(MAKE) -C dep
@@ -79,20 +83,18 @@ ifeq ($(ARCH), lin)
LD_LIBRARY_PATH=dep/lib perf record --call-graph dwarf ./Rack LD_LIBRARY_PATH=dep/lib perf record --call-graph dwarf ./Rack
endif endif



clean: clean:
rm -rfv $(TARGET) libRack.a Rack.res build dist rm -rfv $(TARGET) libRack.a Rack.res build dist


ifeq ($(ARCH), win)
# For Windows resources # For Windows resources
%.res: %.rc %.res: %.rc
windres $^ -O coff -o $@ windres $^ -O coff -o $@

include compile.mk
endif




dist: all dist: all
rm -rf dist rm -rf dist

# Rack distribution # Rack distribution
$(MAKE) -C plugins/Fundamental dist $(MAKE) -C plugins/Fundamental dist


@@ -226,5 +228,10 @@ distplugins:
plugins: plugins:
for f in plugins/*; do (cd "$$f" && ${CMD}); done for f in plugins/*; do (cd "$$f" && ${CMD}); done



# Includes

include compile.mk

.PHONY: all dep run debug clean dist allplugins cleanplugins distplugins plugins .PHONY: all dep run debug clean dist allplugins cleanplugins distplugins plugins
.DEFAULT_GOAL := all .DEFAULT_GOAL := all

+ 1
- 1
compile.mk View File

@@ -69,7 +69,7 @@ build/%.m.o: %.m | dep
@mkdir -p $(@D) @mkdir -p $(@D)
$(CC) $(CFLAGS) -c -o $@ $< $(CC) $(CFLAGS) -c -o $@ $<


# Do nothing by default
# Dummy target
dep: dep:


.PHONY: dep .PHONY: dep

Loading…
Cancel
Save