Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (24 sloc) 885 Bytes
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
ERLC_FLAGS := -W
EBIN_DIR := ../ebin
EMULATOR := beam
ERL_SOURCES := $(wildcard *.erl)
ERL_HEADERS := $(wildcard *.hrl) $(wildcard include/*.hrl)
ERL_OBJECTS := $(ERL_SOURCES:$.erl=$(EBIN_DIR)/%.$(EMULATOR))
MODULES := $(patsubst %.erl,%,$(ERL_SOURCES))
EBIN_FILES := $(MODULES:%=$(EBIN_DIR)/%.$(EMULATOR))
ERLDIR = @ERLDIR@
$(EBIN_DIR)/%.$(EMULATOR):: %.erl
mkdir -p $(EBIN_DIR)
erlc $(ERLC_FLAGS) $(TEST) -I./include -o $(EBIN_DIR) $<
all: $(EBIN_FILES)
cp basic_driver.app ../ebin
clean:
-rm -rf $(EBIN_FILES)
install:
install -d $(ERLDIR)/lib/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
cp -r `pwd`/../ebin $(ERLDIR)/lib/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
package:
install -d `pwd`/../.pkgtmp/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/ebin
cp -r `pwd`/../ebin/* `pwd`/../.pkgtmp/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/ebin