diff options
author | Julian Ospald <hasufell@posteo.de> | 2016-03-12 20:45:25 +0300 |
---|---|---|
committer | Julian Ospald <hasufell@posteo.de> | 2016-03-12 20:47:04 +0300 |
commit | 97e09fbf9fbbe7bf7241ff2ede16ebb72ade9870 (patch) | |
tree | 5b25245e0fa06370e6e9db9d261f5384f741f16a | |
parent | a2e9619c0d3e6866b137875b1fff3ec8ce590cd5 (diff) |
Use object dependencies in Makefile
-rw-r--r-- | steam-mobile/Makefile | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/steam-mobile/Makefile b/steam-mobile/Makefile index 274fbf4..ccf880d 100644 --- a/steam-mobile/Makefile +++ b/steam-mobile/Makefile @@ -31,10 +31,13 @@ endif STEAM_SOURCES = \ steam_connection.c \ - libsteam.c + libsteam.c + +STEAM_OBJS = $(patsubst %.c, %.o, $(STEAM_SOURCES)) + -.PHONY: all clean install all: libsteam.so + install: mkdir -m $(DIR_PERM) -p $(DESTDIR)$(PLUGIN_DIR_PURPLE) install -m $(FILE_PERM) libsteam.so $(DESTDIR)$(PLUGIN_DIR_PURPLE)/$(PRPL_NAME) @@ -44,8 +47,16 @@ install: install -m $(FILE_PERM) steam22.png $(DESTDIR)$(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/22/steam.png mkdir -m $(DIR_PERM) -p $(DESTDIR)$(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/48 install -m $(FILE_PERM) steam48.png $(DESTDIR)$(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/48/steam.png + clean: - rm -f libsteam.so + rm -f libsteam.so *.o + +%.o: %.c + $(CC) -Wall -I. -fPIC $(LIBPURPLE_CFLAGS) $(CFLAGS) -c $*.c + +libsteam.so: $(STEAM_OBJS) + $(CC) -Wall -I. -fPIC $(LIBPURPLE_CFLAGS) $(CFLAGS) $(STEAM_OBJS) -o $@ $(LDFLAGS) $(LIBPURPLE_LIBS) -shared + + +.PHONY: all clean install -libsteam.so: $(STEAM_SOURCES) - $(CC) -Wall -I. -fPIC $(CFLAGS) $(STEAM_SOURCES) -o $@ $(LDFLAGS) $(LIBPURPLE_CFLAGS) $(LIBPURPLE_LIBS) -shared |