# HG changeset patch # User Emmanuel Gil Peyrot # Date 1369125441 -7200 # Node ID 83859b2e2baeaa7f4ccdd36ef2a1f167d32091cd # Parent c55ea9478c801774c2d5536be7817afd871b92df Add build instructions for a shared library. diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -8,16 +8,18 @@ AUDIO_DRV = oss_audio.o # CFLAGS += -DUSE_ALSA=1 # AUDIO_DRV = wave_out.o -all: pmdwin +all: pmdwin libpmdwin.so %.o: %.c $(CC) $(CFLAGS) -c $< -%.o: %.cc +%.o: %.cpp $(CXX) $(CXXFLAGS) -c $< clean: - rm *.o pmdwin + rm -f *.o pmdwin libpmdwin.so pmdwin: pmd_play.o pmdwin.o table.o getopt.o lfg.o $(AUDIO_DRV) fmgen.o $(CC) -o $@ $^ +libpmdwin.so: pmdwin.o table.o getopt.o lfg.o $(AUDIO_DRV) fmgen.o + $(CC) -shared -o $@ $^