From 8cd5a7f161743d6b6a995b92b1702909809b8cdc Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Thu, 9 Feb 2012 14:13:57 -0500 Subject: Move C code into c_src --- src/Makefile | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index ab690a5..7fb96de 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,44 +1,23 @@ -ERLPREFIX = /usr/local -ERLINTERFACE = erl_interface-3.7.6 -ERLINCS = -I$(ERLPREFIX)/lib/erlang/lib/$(ERLINTERFACE)/include -ERLLIBS = -L$(ERLPREFIX)/lib/erlang/lib/$(ERLINTERFACE)/lib \ - -lerl_interface -lei - -MYSQLPREFIX = /usr/local/mysql -MYSQLINCS = -I$(MYSQLPREFIX)/include -#MYSQLLIBS = -L$(MYSQLPREFIX)/lib -lmysqlclient -MYSQLLIBS = $(MYSQLPREFIX)/lib/libmysqlclient.a - -CFLAGS = -g -Wall -Werror $(MYSQLINCS) $(ERLINCS) -LDFLAGS = $(MYSQLLIBS) $(ERLLIBS) EFLAGS = -W +debug_info -PRIVDIR = ../priv BEAMDIR = ../ebin -BINS = $(PRIVDIR)/mysqlerl $(BEAMDIR)/mysqlerl.app -MYSQLERLOBJS = io.o log.o msg.o mysqlerl.o +BINS = $(BEAMDIR)/mysqlerl.app BEAMS = mysqlerl.beam mysqlerl_app.beam mysqlerl_connection.beam \ mysqlerl_port.beam mysqlerl_port_sup.beam mysqlerl_sup.beam -all: $(PRIVDIR) $(BEAMDIR) $(BINS) +all: $(BEAMDIR) $(BINS) clean: - rm -rf *.o *.beam - rm -rf $(BINS) $(MYSQLERLOBJS) $(BEAMS) $(BEAMDIR)/mysqlerl.app + rm -rf *.beam + rm -rf $(BINS) $(BEAMS) $(BEAMDIR)/mysqlerl.app %.beam: %.erl erlc $(EFLAGS) $< -$(PRIVDIR)/mysqlerl: $(PRIVDIR) $(MYSQLERLOBJS) - $(CC) -o $@ $(MYSQLERLOBJS) $(LDFLAGS) - $(BEAMDIR)/mysqlerl.app: $(BEAMDIR) $(BEAMS) cp $(BEAMS) $(BEAMDIR) cp mysqlerl.app $(BEAMDIR) -$(PRIVDIR): - mkdir -p $(PRIVDIR) - $(BEAMDIR): mkdir -p $(BEAMDIR) -- cgit v1.2.3