Makefile installation options

master
flandre scarlet 7 years ago
parent 167a0300de
commit 6bf1252a0c

@ -26,4 +26,17 @@ liblist:
test: liblist test: liblist
gcc $(TEST_SRC) $(CFLAGS) -I$(INCLUDE) -o $(BUILD)/$@$(TARGET_TEST_EXT) $(LFLAGS) $(BUILD)/liblist.a gcc $(TEST_SRC) $(CFLAGS) -I$(INCLUDE) -o $(BUILD)/$@$(TARGET_TEST_EXT) $(LFLAGS) $(BUILD)/liblist.a
$(BUILD)/$@$(TARGET_TEST_EXT) $(BUILD)/$@$(TARGET_TEST_EXT)
install:
cp $(BUILD)/*.a /usr/local/lib/
cp $(INCLUDE)/*.h /usr/local/include/
ln -sf /usr/local/lib/liblist.a /usr/lib/liblist.a
ln -sf /usr/local/include/list.h /usr/include/list.h
uninstall:
rm /usr/local/lib/liblist.a
rm /usr/local/include/list.h
rm /usr/lib/liblist.a
rm /usr/include/list.h

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.
Loading…
Cancel
Save