Created
May 21, 2015 19:08
-
-
Save essen/5e7893d8233add3a5574 to your computer and use it in GitHub Desktop.
Example Makefile generated by erlang.mk when autopatching rebar projects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ERL_CFLAGS = -fPIC -I /usr/lib/erlang/erts-6.4/include -I /usr/lib/erlang/lib/erl_interface-3.7.20/include | |
ERL_LDFLAGS = -L /usr/lib/erlang/lib/erl_interface-3.7.20/lib -lerl_interface -lei | |
EPCAP_CFLAGS= -DHAVE_PCAP_CREATE | |
EXE_LDFLAGS = -lpcap $(ERL_LDFLAGS) | |
EXE_CFLAGS = $(EPCAP_CFLAGS) | |
EXE_CFLAGS = $(EPCAP_CFLAGS) -DEPCAP_RLIMIT_NOFILES=1 | |
all:: ../priv/epcap | |
%.o: %.c | |
$(CC) -c -o $@ $< $(CFLAGS) $(ERL_CFLAGS) $(DRV_CFLAGS) $(EXE_CFLAGS) | |
%.o: %.C | |
$(CXX) -c -o $@ $< $(CXXFLAGS) $(ERL_CFLAGS) $(DRV_CFLAGS) $(EXE_CFLAGS) | |
%.o: %.cc | |
$(CXX) -c -o $@ $< $(CXXFLAGS) $(ERL_CFLAGS) $(DRV_CFLAGS) $(EXE_CFLAGS) | |
%.o: %.cpp | |
$(CXX) -c -o $@ $< $(CXXFLAGS) $(ERL_CFLAGS) $(DRV_CFLAGS) $(EXE_CFLAGS) | |
../priv/epcap: $(foreach ext,.c .C .cc .cpp,$(patsubst %$(ext),%.o,$(filter %$(ext),$(wildcard epcap.c epcap_priv.c)))) | |
$(CC) -o $@ $? $(LDFLAGS) $(ERL_LDFLAGS) $(DRV_LDFLAGS) $(EXE_LDFLAGS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment